[PATCH] Really *do* nothing in while loop
authorThomas Glanzmann <sithglan@stud.uni-erlangen.de>
Sun, 8 May 2005 09:34:40 +0000 (11:34 +0200)
committerPetr Baudis <xpasky@machine.sinus.cz>
Sun, 8 May 2005 15:29:33 +0000 (17:29 +0200)
A deflate loop in sha1_file.c would have /* nothing */ as its
body, but the semicolon was missing, so the next command was run.
Fortunately the loop went through exactly once so it didn't trigger
an actual bug so far.

Signed-Off-by: Thomas Glanzmann <sithglan@stud.uni-erlangen.de>
Signed-off-by: Petr Baudis <pasky@ucw.cz>
sha1_file.c

index f1c1c70d784aa0587cd4c7143c3d464fd8e5ddc6..e21f4b30d6dd42be55547bd606929c52629571ad 100644 (file)
@@ -335,7 +335,7 @@ int write_sha1_file(char *buf, unsigned long len, const char *type, unsigned cha
        stream.next_in = hdr;
        stream.avail_in = hdrlen;
        while (deflate(&stream, 0) == Z_OK)
-               /* nothing */
+               /* nothing */;
 
        /* Then the data itself.. */
        stream.next_in = buf;