From d874c38335290a3b501bba2ae9b87e49cf03b1c3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 30 Jul 2016 08:58:54 -0700 Subject: 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. --- src/pch.c | 8 ++++---- 1 file 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) -- cgit v1.2.1