lkml.org 
[lkml]   [2005]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Really *do* nothing in while loop [OT - style]
    Thomas Glanzmann wrote:
    > [PATCH] Really *do* nothing in while loop
    >
    > Signed-Off-by: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
    >
    > --- a/sha1_file.c
    > +++ b/sha1_file.c
    > @@ -335,7 +335,7 @@
    > stream.next_in = hdr;
    > stream.avail_in = hdrlen;
    > while (deflate(&stream, 0) == Z_OK)
    > - /* nothing */
    > + /* nothing */;

    I am explicitly ignoring the core subject on this thread. This
    is a side note, regarding coding style.

    I always use a common format for an empty body:

    while (deflate(&stream, 0) == Z_OK)
    {}

    It stands out and positively says what is meant. As such it
    makes it much more readable.

    I think that CodingStyle should provide guidance for empty
    bodies.

    --
    Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
    attach .zip as .dat
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-05-08 15:23    [W:0.044 / U:30.344 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site