diff options
author | Jim Meyering <meyering@fb.com> | 2016-07-30 08:58:54 -0700 |
---|---|---|
committer | Andreas Gruenbacher <agruen@gnu.org> | 2016-07-31 10:17:52 +0200 |
commit | d874c38335290a3b501bba2ae9b87e49cf03b1c3 (patch) | |
tree | 4f1d21b3e47e88ae5aa910bf9a860d1e4b0f16ec | |
parent | b6c4780f73708cd752d212b0b1fb4acd2bd90595 (diff) | |
download | patch-d874c38335290a3b501bba2ae9b87e49cf03b1c3.tar.gz |
maint: placate a "make syntax-check" rule
* src/pch.c (set_hunkmax): Don't cast return value of xmalloc.
(grow_hunkmax): Likewise for two uses of realloc that the syntax-check
rule did not detect.
-rw-r--r-- | src/pch.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -170,9 +170,9 @@ static void set_hunkmax (void) { if (!p_line) - p_line = (char **) xmalloc (hunkmax * sizeof *p_line); + p_line = xmalloc (hunkmax * sizeof *p_line); if (!p_len) - p_len = (size_t *) xmalloc (hunkmax * sizeof *p_len); + p_len = xmalloc (hunkmax * sizeof *p_len); if (!p_Char) p_Char = xmalloc (hunkmax * sizeof *p_Char); } @@ -184,8 +184,8 @@ grow_hunkmax (void) { hunkmax *= 2; assert (p_line && p_len && p_Char); - if ((p_line = (char **) realloc (p_line, hunkmax * sizeof (*p_line))) - && (p_len = (size_t *) realloc (p_len, hunkmax * sizeof (*p_len))) + if ((p_line = realloc (p_line, hunkmax * sizeof (*p_line))) + && (p_len = realloc (p_len, hunkmax * sizeof (*p_len))) && (p_Char = realloc (p_Char, hunkmax * sizeof (*p_Char)))) return true; if (!using_plan_a) |