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

Diff for /src/usr.bin/cvs/buf.c between version 1.12 and 1.13

version 1.12, 2005/06/02 07:16:38 version 1.13, 2005/07/07 14:27:57
Line 414 
Line 414 
   
         fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, mode);          fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, mode);
         if (fd == -1) {          if (fd == -1) {
                 cvs_log(LP_ERRNO, "failed to open file `%s'", path);                  cvs_log(LP_ERRNO, "failed to open file `%s'", path);
                 return (-1);                  return (-1);
         }          }
   
Line 431 
Line 431 
 /*  /*
  * cvs_buf_write_stmp()   * cvs_buf_write_stmp()
  *   *
  * Write the contents of the buffer <b> to a temporary file whose path is   * Write the contents of the buffer <b> to a temporary file whose path is
  * specified using <template> (see mkstemp.3). NB. This function will modify   * specified using <template> (see mkstemp.3). NB. This function will modify
  * <template>, as per mkstemp   * <template>, as per mkstemp
  */   */
Line 443 
Line 443 
   
         fd = mkstemp(template);          fd = mkstemp(template);
         if (fd == -1) {          if (fd == -1) {
                 cvs_log(LP_ERRNO, "failed to mkstemp file `%s': %s",                  cvs_log(LP_ERRNO, "failed to mkstemp file `%s': %s",
                     template, strerror(errno));                      template, strerror(errno));
                 return (-1);                  return (-1);
         }          }
   
         ret = cvs_buf_write_fd(b, fd);          ret = cvs_buf_write_fd(b, fd);
         if (ret == -1) {          if (ret == -1) {
                 cvs_log(LP_ERRNO, "failed to write to temp file `%s': %s",                  cvs_log(LP_ERRNO, "failed to write to temp file `%s': %s",
                     template, strerror(errno));                      template, strerror(errno));
                 (void)unlink(template);                  (void)unlink(template);
         }          }

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13