summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2016-07-30 08:58:54 -0700
committerAndreas Gruenbacher <agruen@gnu.org>2016-07-31 10:17:52 +0200
commitd874c38335290a3b501bba2ae9b87e49cf03b1c3 (patch)
tree4f1d21b3e47e88ae5aa910bf9a860d1e4b0f16ec
parentb6c4780f73708cd752d212b0b1fb4acd2bd90595 (diff)
downloadpatch-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pch.c b/src/pch.c
index 84adba1..94a0ac1 100644
--- a/src/pch.c
+++ b/src/pch.c
@@ -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)