- mark function static
- add missing return statement
- avoid uninitialized use of "len"
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
close(devnull);
}
-void *gzip_thread(void *ptr)
+static void *gzip_thread(void *ptr)
{
struct gzip_handle *zh = ptr;
char buf[4096];
- int len, ret;
+ int len = 0, ret;
while (1) {
if (zh->file)
close(zh->wfd);
zh->wfd = -1;
+
+ return NULL;
}
int gzip_exec(struct gzip_handle *zh, const char *filename)