mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Apply some touchups
This commit is contained in:
parent
9f149e1de3
commit
2f3bd90216
139 changed files with 1188 additions and 1154 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue