[BACK]Return to join.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / join

Diff for /src/usr.bin/join/join.c between version 1.23 and 1.24

version 1.23, 2014/10/11 04:31:55 version 1.24, 2015/01/16 06:40:08
Line 33 
Line 33 
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   
 #include <sys/param.h>  
   
 #include <err.h>  #include <err.h>
 #include <stdio.h>  #include <stdio.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
   
   #define MAXIMUM(a, b)   (((a) > (b)) ? (a) : (b))
   
 /*  /*
  * There's a structure per input file which encapsulates the state of the   * 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   * file.  We repeatedly read lines from each file until we've read in all
Line 347 
Line 347 
                 if (lp->linealloc <= len + 1) {                  if (lp->linealloc <= len + 1) {
                         char *p;                          char *p;
                         u_long newsize = lp->linealloc +                          u_long newsize = lp->linealloc +
                             MAX(100, len + 1 - lp->linealloc);                              MAXIMUM(100, len + 1 - lp->linealloc);
                         if ((p = realloc(lp->line, newsize)) == NULL)                          if ((p = realloc(lp->line, newsize)) == NULL)
                                 err(1, NULL);                                  err(1, NULL);
                         lp->line = p;                          lp->line = p;

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24