User: Password:
|
|
Subscribe / Log in / New account

The rest of the vmsplice() exploit story

The rest of the vmsplice() exploit story

Posted Mar 5, 2008 11:12 UTC (Wed) by epa (subscriber, #39769)
Parent article: The rest of the vmsplice() exploit story

    if (!pipe->readers) {
	send_sig(SIGPIPE, current, 0);
	if (!ret)
	    ret = -EPIPE;
	    break;
    }
Is the indentation in this code extract correct?


(Log in to post comments)

The rest of the vmsplice() exploit story

Posted Mar 5, 2008 12:32 UTC (Wed) by Los__D (guest, #15263) [Link]

Heh, you've got good eyes! :)

The rest of the vmsplice() exploit story

Posted Mar 5, 2008 14:00 UTC (Wed) by jzbiciak (subscriber, #5246) [Link]

Ironically, "break;" is the only correctly indented line in that loop body. (That is, if you go with the Linux kernel standard 8 character indent.)

Indentation

Posted Mar 5, 2008 14:48 UTC (Wed) by corbet (editor, #1) [Link]

The indentation of the break line was clearly wrong (and different from the real code), I fixed it.

As for indent depth, I routinely shorten it in code samples to make the result fit in the browser window. The original code uses full-tab indents.

Indentation

Posted Mar 5, 2008 19:14 UTC (Wed) by jzbiciak (subscriber, #5246) [Link]

I did notice the consistent 4-character indents elsewhere.  I was being a tad tongue-in-cheek
because of the apparent irony.  (It was clear that the 'break' statement was the odd man out.)


Cheers,

--Joe


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds