]> git.ozlabs.org Git - ppp.git/commitdiff
pppd: Fix compile warning due to comparing pointer to NUL character
authorPaul Mackerras <paulus@ozlabs.org>
Sat, 23 Jun 2018 06:40:27 +0000 (16:40 +1000)
committerPaul Mackerras <paulus@ozlabs.org>
Sat, 23 Jun 2018 06:40:27 +0000 (16:40 +1000)
Evidently this means to check for arg pointing to an empty string,
not arg being NULL, since the ensuing error talks about the variable
name being missing.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
pppd/options.c

index 482dce69e666467a5dc1feef08703b7a50802caf..5db580a0e270c0628fb99d1400423599a1f0ce5e 100644 (file)
@@ -1753,7 +1753,7 @@ user_unsetenv(argv)
        option_error("unexpected = in name: %s", arg);
        return 0;
     }
-    if (arg == '\0') {
+    if (*arg == '\0') {
        option_error("missing variable name for unset");
        return 0;
     }