summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2018-03-22 13:20:30 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2018-03-22 13:20:30 +0100
commit42c8350cdd46d2939378b81fbbc359d3a6bfce4f (patch)
treed977cc4cf745df46ef73750ae63a7f5ae418bc7f
parent8c8c6b8d5b59cbe48c9ad62cceae2f8209f4025e (diff)
src/file_gz.c: minor style modification
-rw-r--r--src/file_gz.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/file_gz.c b/src/file_gz.c
index d50b633..1b97079 100644
--- a/src/file_gz.c
+++ b/src/file_gz.c
@@ -109,15 +109,17 @@ static int header_check_gz(const unsigned char *buffer, const unsigned int buffe
}
if((flags&GZ_FNAME)!=0)
{
- while(off<buffer_size && buffer[off++]!='\0')
+ for(; off<buffer_size && buffer[off]!='\0'; off++)
{
}
+ off++;
}
if((flags&GZ_FCOMMENT)!=0)
{
- while(off<buffer_size && buffer[off++]!='\0')
+ for(; off<buffer_size && buffer[off]!='\0'; off++)
{
}
+ off++;
}
if((flags&GZ_FHCRC)!=0)
{