Apply some touchups

This commit is contained in:
Justine Tunney 2021-02-07 06:11:44 -08:00
parent 9f149e1de3
commit 2f3bd90216
139 changed files with 1188 additions and 1154 deletions

View file

@ -20,6 +20,8 @@
/**
* Returns value of environment variable, or NULL if not found.
*
* Environment variables can store empty string on Unix but not Windows.
*/
char *getenv(const char *s) {
char **p;
@ -29,7 +31,7 @@ char *getenv(const char *s) {
for (j = 0;; ++j) {
if (!s[j]) {
if (p[i][j] == '=') {
return &p[i][j + 1];
return p[i] + j + 1;
}
break;
}