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

Diff for /src/usr.bin/cut/cut.c between version 1.18 and 1.19

version 1.18, 2014/02/02 11:44:01 version 1.19, 2015/08/18 17:10:48
Line 225 
Line 225 
                 output = 0;                  output = 0;
                 if (lbuf[len - 1] != '\n') {                  if (lbuf[len - 1] != '\n') {
                         /* no newline at the end of the last line so add one */                          /* no newline at the end of the last line so add one */
                         if ((tbuf = (char *)malloc(len + 1)) == NULL)                          if ((tbuf = malloc(len + 1)) == NULL)
                                 err(1, NULL);                                  err(1, NULL);
                         memcpy(tbuf, lbuf, len);                          memcpy(tbuf, lbuf, len);
                         tbuf[len] = '\n';                          tbuf[len] = '\n';

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19