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

Diff for /src/usr.bin/unifdef/unifdef.c between version 1.31 and 1.32

version 1.31, 2019/06/28 05:35:35 version 1.32, 2019/06/28 13:35:05
Line 410 
Line 410 
                 process();                  process();
                 return;                  return;
         }          }
         if (stat(ofn, &st) < 0) {          if (stat(ofn, &st) == -1) {
                 output = fopen(ofn, "wb");                  output = fopen(ofn, "wb");
                 if (output == NULL)                  if (output == NULL)
                         err(2, "can't create %s", ofn);                          err(2, "can't create %s", ofn);
Line 427 
Line 427 
   
         if (backext != NULL && *backext != '\0') {          if (backext != NULL && *backext != '\0') {
                 char *backname = astrcat(ofn, backext);                  char *backname = astrcat(ofn, backext);
                 if (rename(ofn, backname) < 0)                  if (rename(ofn, backname) == -1)
                         err(2, "can't rename \"%s\" to \"%s\"", ofn, backname);                          err(2, "can't rename \"%s\" to \"%s\"", ofn, backname);
                 free(backname);                  free(backname);
         }          }
         if (rename(tempname, ofn) < 0)          if (rename(tempname, ofn) == -1)
                 err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn);                  err(2, "can't rename \"%s\" to \"%s\"", tempname, ofn);
         free(tempname);          free(tempname);
         tempname = NULL;          tempname = NULL;

Legend:
Removed from v.1.31  
changed lines
  Added in v.1.32