]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
src/mkhelp: make generated code pass `checksrc`
authorViktor Szakats <commit@vsz.me>
Tue, 26 Sep 2023 17:08:26 +0000 (17:08 +0000)
committerViktor Szakats <commit@vsz.me>
Tue, 26 Sep 2023 22:09:21 +0000 (22:09 +0000)
Closes #11955

src/mkhelp.pl

index 19a30e2c812d8d4950f87e70a2b15e3bc5beccd2..91551cfb4da9836d1fd6372d57b2edeae521a63d 100755 (executable)
@@ -151,12 +151,12 @@ static void zfree_func(voidpf opaque, voidpf ptr)
 /* Decompress and send to stdout a gzip-compressed buffer */
 void hugehelp(void)
 {
-  unsigned charbuf;
-  int status,headerlen;
+  unsigned char *buf;
+  int status, headerlen;
   z_stream z;
 
   /* Make sure no gzip options are set */
-  if (hugehelpgz[3] & 0xfe)
+  if(hugehelpgz[3] & 0xfe)
     return;
 
   headerlen = 10;
@@ -166,18 +166,18 @@ void hugehelp(void)
   z.avail_in = (unsigned int)(sizeof(hugehelpgz) - headerlen);
   z.next_in = (unsigned char *)hugehelpgz + headerlen;
 
-  if (inflateInit2(&z, -MAX_WBITS) != Z_OK)
+  if(inflateInit2(&z, -MAX_WBITS) != Z_OK)
     return;
 
   buf = malloc(BUF_SIZE);
-  if (buf) {
+  if(buf) {
     while(1) {
       z.avail_out = BUF_SIZE;
       z.next_out = buf;
       status = inflate(&z, Z_SYNC_FLUSH);
-      if (status == Z_OK || status == Z_STREAM_END) {
+      if(status == Z_OK || status == Z_STREAM_END) {
         fwrite(buf, BUF_SIZE - z.avail_out, 1, stdout);
-        if (status == Z_STREAM_END)
+        if(status == Z_STREAM_END)
           break;
       }
       else