changeset 1745:1b97da3c7b91

Patch from David Halls to fix mac/ios portability issue.
author Rob Landley <rob@landley.net>
date Sat, 21 Mar 2015 15:29:21 -0500
parents 0c30e5484516
children b11f536bac74
files lib/portability.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib/portability.c	Thu Mar 19 13:57:02 2015 -0500
+++ b/lib/portability.c	Sat Mar 21 15:29:21 2015 -0500
@@ -45,7 +45,7 @@
       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 @@
     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';