summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/column/column.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/column/column.c b/usr.bin/column/column.c
index ccaa824..ca2837d 100644
--- a/usr.bin/column/column.c
+++ b/usr.bin/column/column.c
@@ -247,10 +247,10 @@ maketbl(void)
(cols[coloff] = wcstok(p, separator, &last));
p = NULL)
if (++coloff == maxcols) {
- if (!(cols = realloc(cols, (u_int)maxcols +
- DEFCOLS * sizeof(char *))) ||
+ if (!(cols = realloc(cols, ((u_int)maxcols +
+ DEFCOLS) * sizeof(char *))) ||
!(lens = realloc(lens,
- (u_int)maxcols + DEFCOLS * sizeof(int))))
+ ((u_int)maxcols + DEFCOLS) * sizeof(int))))
err(1, NULL);
memset((char *)lens + maxcols * sizeof(int),
0, DEFCOLS * sizeof(int));
OpenPOWER on IntegriCloud