aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
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';