From: Holger Schemel Date: Sun, 17 Feb 2019 21:02:36 +0000 (+0100) Subject: minor code cleanup X-Git-Tag: 4.1.2.0~4 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8bdedff68aff9410604ae381dad5bbce8e47a7c9;p=rocksndiamonds.git minor code cleanup --- diff --git a/src/libgame/zip/miniunz.c b/src/libgame/zip/miniunz.c index 285d10ed..cf9839b1 100644 --- a/src/libgame/zip/miniunz.c +++ b/src/libgame/zip/miniunz.c @@ -628,24 +628,24 @@ char **zip_extract(char *filename, char *directory) return NULL; } - if (CHDIR(directory)) // change to target directory + if (CHDIR(directory) != 0) // change to target directory { - debug_printf("Cannot change to directory '%s'!\n", directory); + debug_printf("Cannot change to directory '%s'!\n", directory); - unzClose(uf); + unzClose(uf); - return NULL; + return NULL; } int success = (miniunz_extract_all(uf, 0, 1, NULL) == UNZ_OK); - if (CHDIR(last_directory)) // change back to previous directory + if (CHDIR(last_directory) != 0) // change back to previous directory { - debug_printf("Cannot change to directory '%s'!\n", last_directory); + debug_printf("Cannot change to directory '%s'!\n", last_directory); - unzClose(uf); + unzClose(uf); - return NULL; + return NULL; } unzClose(uf);