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

Diff for /src/usr.bin/fold/fold.c between version 1.9 and 1.10

version 1.9, 2003/06/25 21:19:19 version 1.10, 2003/09/26 22:22:50
Line 172 
Line 172 
                 }                  }
   
                 if (indx + 1 > buf_max) {                  if (indx + 1 > buf_max) {
                           int newmax = buf_max + 2048;
                           char *newbuf;
   
                         /* Allocate buffer in LINE_MAX increments */                          /* Allocate buffer in LINE_MAX increments */
                         buf_max += 2048;                          if ((newbuf = realloc(buf, newmax)) == NULL) {
                         if((buf = realloc(buf, buf_max)) == NULL) {  
                                 err(1, NULL);                                  err(1, NULL);
                                 /* NOTREACHED */                                  /* NOTREACHED */
                         }                          }
                           buf = newbuf;
                           buf_max = newmax;
                 }                  }
                 buf[indx++] = ch;                  buf[indx++] = ch;
         }          }

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10