diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2022-12-25 14:53:47 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2022-12-25 16:13:10 -0800 |
commit | 96cd660ad06675e811505229c029004efe9a3a8f (patch) | |
tree | ede3f4eaa8033bb31dbbec104d9ef24c3cf2b279 /unpack.c | |
parent | 8ae183ff73ff5827a6e0f260ad591fe5fae33127 (diff) | |
download | gzip-96cd660ad06675e811505229c029004efe9a3a8f.tar.gz |
maint: port function definitions to C23
C23 does not allow K&R style function definitions.
Use protyped definitions. However, don't bother with (void) in
function definitions since C23 prefers (); so prefer () to (void) as
this will work with older compilers anyway.
Diffstat (limited to 'unpack.c')
-rw-r--r-- | unpack.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -78,7 +78,7 @@ local int valid; /* number of valid bits in bitbuf */ /* Read an input byte, reporting an error at EOF. */ static unsigned char -read_byte (void) +read_byte () { int b = get_byte (); if (b < 0) @@ -209,9 +209,11 @@ local void build_tree() * IN assertions: the buffer inbuf contains already the beginning of * the compressed data, from offsets inptr to insize-1 included. * The magic header has already been checked. The output buffer is cleared. + * + * 'in' and 'out' are the input and output file descriptors. */ -int unpack(in, out) - int in, out; /* input and output file descriptors */ +int +unpack (int in, int out) { int len; /* Bit length of current code */ unsigned eob; /* End Of Block code */ |