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

Diff for /src/usr.bin/signify/signify.c between version 1.78 and 1.79

version 1.78, 2014/05/06 23:50:53 version 1.79, 2014/05/14 15:33:41
Line 543 
Line 543 
         char buf[1024];          char buf[1024];
         char *line, *endline;          char *line, *endline;
         struct checksum *checksums = NULL, *c = NULL;          struct checksum *checksums = NULL, *c = NULL;
         int nchecksums = 0;          int nchecksums = 0, checksumspace = 0;
         int i, j, rv, uselist, count, hasfailed;          int i, j, rv, uselist, count, hasfailed;
         int *failures;          int *failures;
   
         line = msg;          line = msg;
         while (line && *line) {          while (line && *line) {
                 if (!(checksums = reallocarray(checksums,                  if (nchecksums == checksumspace) {
                     nchecksums + 1, sizeof(*checksums))))                          checksumspace = 2 * (nchecksums + 1);
                         err(1, "realloc");                          if (!(checksums = reallocarray(checksums,
                               checksumspace, sizeof(*checksums))))
                                   err(1, "realloc");
                   }
                 c = &checksums[nchecksums++];                  c = &checksums[nchecksums++];
                 if ((endline = strchr(line, '\n')))                  if ((endline = strchr(line, '\n')))
                         *endline++ = '\0';                          *endline++ = '\0';

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79