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

Diff for /src/usr.bin/sdiff/edit.c between version 1.4 and 1.5

version 1.4, 2005/12/27 04:28:08 version 1.5, 2005/12/27 04:31:06
Line 100 
Line 100 
   
         /* If we don't write anything to the file, just close. */          /* If we don't write anything to the file, just close. */
         if (s == NULL) {          if (s == NULL) {
                 if (close(fd)) {                  close(fd);
                         warn("could not close %s", filename);  
                         cleanup(filename);  
                         /* NOTREACHED */  
                 }  
   
                 return (filename);                  return (filename);
         }          }
Line 124 
Line 120 
         }          }
   
         /* Close temp file. */          /* Close temp file. */
         if (fclose(file)) {          fclose(file);
                 warn("could not close %s", filename);  
                 cleanup(filename);  
                 /* NOTREACHED */  
         }  
   
         return (filename);          return (filename);
 }  }
Line 240 
Line 232 
         /* We've reached the end of the temporary file, so remove it. */          /* We've reached the end of the temporary file, so remove it. */
         if (unlink(filename))          if (unlink(filename))
                 warn("could not delete: %s", filename);                  warn("could not delete: %s", filename);
         if (fclose(file))          fclose(file);
                 warn("could not close: %s", filename);  
   
         /* filename was malloc()ed in xmktemp(). */          /* filename was malloc()ed in xmktemp(). */
         free((void *)filename);          free((void *)filename);

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5