From fea1cbf7484df23a6fe0b62ccd1de271bc1f931a Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Fri, 26 Feb 2016 11:10:24 +0100 Subject: misc: never cast void* from malloc(3) and friends Such cast could hide serious compiler warnings in case we are missing includes (e.g. or "xalloc.h"). See http://stackoverflow.com/questions/605845/do-i-cast-the-result-of-malloc Signed-off-by: Ruediger Meier --- text-utils/col.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'text-utils/col.c') diff --git a/text-utils/col.c b/text-utils/col.c index 53f0556d3..0823573f4 100644 --- a/text-utils/col.c +++ b/text-utils/col.c @@ -362,7 +362,7 @@ int main(int argc, char **argv) int need; need = l->l_lsize ? l->l_lsize * 2 : 90; - l->l_line = (CHAR *)xrealloc((void *) l->l_line, + l->l_line = xrealloc((void *) l->l_line, (unsigned) need * sizeof(CHAR)); l->l_lsize = need; } @@ -472,7 +472,7 @@ void flush_line(LINE *l) */ if (l->l_lsize > sorted_size) { sorted_size = l->l_lsize; - sorted = (CHAR *)xrealloc((void *)sorted, + sorted = xrealloc((void *)sorted, (unsigned)sizeof(CHAR) * sorted_size); } if (l->l_max_col >= count_size) { -- cgit v1.2.3-55-g7522