From cff8e136c02fb3c03289acd98e274f85dca42023 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 21 Mar 2015 15:29:21 -0500 Subject: [PATCH] Patch from David Halls to fix mac/ios portability issue. --- lib/portability.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/portability.c b/lib/portability.c index 7d6d85f..4da49dd 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'; -- 2.7.4