Browse Source

It is odd that pointer to 'char' type is compared with the '\0' value.

Correct compare with *eqword follows in a correct error message.
pre-master-46
dwarning 8 years ago
committed by Holger Vogt
parent
commit
a2c5cb4301
  1. 4
      src/frontend/device.c

4
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);
}

Loading…
Cancel
Save