summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderaadt <deraadt>2017-03-25 23:13:45 +0000
committerderaadt <deraadt>2017-03-25 23:13:45 +0000
commitad6f0861298080893afd9dde143516c61d38b572 (patch)
tree6a05311f59b8d09f7ff83a76b0b7b985196020ce
parenta432e5299f093da1d73bca344127d0232906c39e (diff)
downloadpatch-ad6f0861298080893afd9dde143516c61d38b572.tar
patch-ad6f0861298080893afd9dde143516c61d38b572.tar.gz
parameter "lines_allocated" is a local pointer and should not be confused
with the global by the same name, so rename it "lines_allocatedp".
-rw-r--r--inp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/inp.c b/inp.c
index 755c3d0..6cc6b5c 100644
--- a/inp.c
+++ b/inp.c
@@ -106,22 +106,22 @@ scan_input(const char *filename)
}
static bool
-reallocate_lines(size_t *lines_allocated)
+reallocate_lines(size_t *lines_allocatedp)
{
char **p;
size_t new_size;
- new_size = *lines_allocated * 3 / 2;
+ new_size = *lines_allocatedp * 3 / 2;
p = reallocarray(i_ptr, new_size + 2, sizeof(char *));
if (p == NULL) { /* shucks, it was a near thing */
munmap(i_womp, i_size);
i_womp = NULL;
free(i_ptr);
i_ptr = NULL;
- *lines_allocated = 0;
+ *lines_allocatedp = 0;
return false;
}
- *lines_allocated = new_size;
+ *lines_allocatedp = new_size;
i_ptr = p;
return true;
}