Fixed bug in checking of last char of environment variable
authorceriel <none@none>
Wed, 24 Apr 1991 12:18:03 +0000 (12:18 +0000)
committerceriel <none@none>
Wed, 24 Apr 1991 12:18:03 +0000 (12:18 +0000)
lang/cem/libcc.ansi/stdlib/getenv.c

index ae9f0f6..15c493d 100644 (file)
@@ -18,8 +18,8 @@ getenv(const char *name)
                return (char *)NULL;
        while ((p = *v++) != NULL) {
                q = name;
-               while (*q && (*q++ == *p++))
-                       /* EMPTY */ ;
+               while (*q && (*q == *p++))
+                       q++;
                if (*q || (*p != '='))
                        continue;
                return (char *)p + 1;