From a2c5cb43014e2dd17b040b1c4dc7242b55828fb8 Mon Sep 17 00:00:00 2001 From: dwarning Date: Mon, 29 Oct 2018 17:00:13 +0100 Subject: [PATCH] It is odd that pointer to 'char' type is compared with the '\0' value. Correct compare with *eqword follows in a correct error message. --- src/frontend/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frontend/device.c b/src/frontend/device.c index faa592ad9..9c7e7a453 100644 --- a/src/frontend/device.c +++ b/src/frontend/device.c @@ -1385,7 +1385,7 @@ com_alter_mod(wordlist *wl) eqword++; while (*eqword == ' ') eqword++; - if (eqword == '\0') { + if (*eqword == '\0') { fprintf(cp_err, "Error: no filename given\n"); controlled_exit(1); } @@ -1395,7 +1395,7 @@ com_alter_mod(wordlist *wl) eqword += 4; while (*eqword == ' ') eqword++; - if (eqword == '\0') { + if (*eqword == '\0') { fprintf(cp_err, "Error: no filename given\n"); controlled_exit(1); }