File: pat

package info (click to toggle)
bsdmainutils 4.4.0.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 592 kB
  • ctags: 479
  • sloc: ansic: 5,905; makefile: 126; sh: 116
file content (16 lines) | stat: -rw-r--r-- 637 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--- column.c.orig	Sun Nov 26 00:43:23 1995
+++ column.c	Tue Aug 25 19:47:50 1998
@@ -226,10 +226,10 @@
 		for (coloff = 0, p = *lp; cols[coloff] = strtok(p, separator);
 		    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));