diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2017-03-25 23:13:46 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2017-03-25 23:13:46 +0000 |
commit | fbeb9258c7bb774700c50fbc56c6d3a77142f2ee (patch) | |
tree | 9d796d2b02464e68907d6fac49873b3e0cac7b6c /usr.bin | |
parent | face1c1fd0cfc65b64bbc9193b3dc8f1ab7d14ad (diff) |
parameter "lines_allocated" is a local pointer and should not be confused
with the global by the same name, so rename it "lines_allocatedp".
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/patch/inp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/patch/inp.c b/usr.bin/patch/inp.c index 3f6086108f4..45f89d29d49 100644 --- a/usr.bin/patch/inp.c +++ b/usr.bin/patch/inp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inp.c,v 1.46 2016/07/19 06:43:27 deraadt Exp $ */ +/* $OpenBSD: inp.c,v 1.47 2017/03/25 23:13:45 deraadt Exp $ */ /* * patch - a program to apply diffs to original files @@ -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; } |