summaryrefslogtreecommitdiffstats
path: root/usr.bin/unzip/unzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/unzip/unzip.c')
-rw-r--r--usr.bin/unzip/unzip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c
index 1fa3564..accd653 100644
--- a/usr.bin/unzip/unzip.c
+++ b/usr.bin/unzip/unzip.c
@@ -422,7 +422,7 @@ handle_existing_file(char **path)
fprintf(stderr,
"replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ",
*path);
- if (fgets(buf, sizeof(buf), stdin) == 0) {
+ if (fgets(buf, sizeof(buf), stdin) == NULL) {
clearerr(stdin);
printf("NULL\n(EOF or read error, "
"treating as \"[N]one\"...)\n");
OpenPOWER on IntegriCloud