diff options
author | Rob Landley <rob@landley.net> | 2015-03-21 15:29:21 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-03-21 15:29:21 -0500 |
commit | cff8e136c02fb3c03289acd98e274f85dca42023 (patch) | |
tree | b32794ac2d59d5aa1af1d30321df311543e4927a /lib | |
parent | 2fd8a74dcae1cd01879a3e9a733d798bb386dc16 (diff) | |
download | toybox-cff8e136c02fb3c03289acd98e274f85dca42023.tar.gz |
Patch from David Halls to fix mac/ios portability issue.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/portability.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/portability.c b/lib/portability.c index 7d6d85f3..4da49dd6 100644 --- a/lib/portability.c +++ b/lib/portability.c @@ -45,7 +45,7 @@ ssize_t getdelim(char **linep, size_t *np, int delim, FILE *stream) new_line = realloc(*linep, new_len); if (!new_line) return -1; *np = new_len; - *linep = new_line; + line = *linep = new_line; } line[i] = ch; @@ -59,7 +59,7 @@ ssize_t getdelim(char **linep, size_t *np, int delim, FILE *stream) new_line = realloc(*linep, new_len); if (!new_line) return -1; *np = new_len; - *linep = new_line; + line = *linep = new_line; } line[i + 1] = '\0'; |