=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/join/join.c,v retrieving revision 1.23 retrieving revision 1.24 diff -c -r1.23 -r1.24 *** src/usr.bin/join/join.c 2014/10/11 04:31:55 1.23 --- src/usr.bin/join/join.c 2015/01/16 06:40:08 1.24 *************** *** 1,4 **** ! /* $OpenBSD: join.c,v 1.23 2014/10/11 04:31:55 doug Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 --- 1,4 ---- ! /* $OpenBSD: join.c,v 1.24 2015/01/16 06:40:08 deraadt Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 *************** *** 33,46 **** * SUCH DAMAGE. */ - #include - #include #include #include #include #include /* * There's a structure per input file which encapsulates the state of the * file. We repeatedly read lines from each file until we've read in all --- 33,46 ---- * SUCH DAMAGE. */ #include #include #include #include #include + #define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) + /* * There's a structure per input file which encapsulates the state of the * file. We repeatedly read lines from each file until we've read in all *************** *** 347,353 **** if (lp->linealloc <= len + 1) { char *p; u_long newsize = lp->linealloc + ! MAX(100, len + 1 - lp->linealloc); if ((p = realloc(lp->line, newsize)) == NULL) err(1, NULL); lp->line = p; --- 347,353 ---- if (lp->linealloc <= len + 1) { char *p; u_long newsize = lp->linealloc + ! MAXIMUM(100, len + 1 - lp->linealloc); if ((p = realloc(lp->line, newsize)) == NULL) err(1, NULL); lp->line = p;