aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-03-21 15:29:21 -0500
committerRob Landley <rob@landley.net>2015-03-21 15:29:21 -0500
commitcff8e136c02fb3c03289acd98e274f85dca42023 (patch)
treeb32794ac2d59d5aa1af1d30321df311543e4927a /lib
parent2fd8a74dcae1cd01879a3e9a733d798bb386dc16 (diff)
downloadtoybox-cff8e136c02fb3c03289acd98e274f85dca42023.tar.gz
Patch from David Halls to fix mac/ios portability issue.
Diffstat (limited to 'lib')
-rw-r--r--lib/portability.c4
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';