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

Diff for /src/usr.bin/rcs/rcsclean.c between version 1.50 and 1.51

version 1.50, 2007/06/30 08:23:49 version 1.51, 2010/07/23 21:46:05
Line 165 
Line 165 
                 warnx("failed to get needed revision");                  warnx("failed to get needed revision");
                 goto out;                  goto out;
         }          }
         if ((b2 = rcs_buf_load(fname, 0)) == NULL) {          if ((b2 = buf_load(fname, 0)) == NULL) {
                 warnx("failed to load `%s'", fname);                  warnx("failed to load `%s'", fname);
                 goto out;                  goto out;
         }          }
   
         /* If buffer lengths are the same, compare contents as well. */          /* If buffer lengths are the same, compare contents as well. */
         if (rcs_buf_len(b1) != rcs_buf_len(b2))          if (buf_len(b1) != buf_len(b2))
                 match = 0;                  match = 0;
         else {          else {
                 size_t len, n;                  size_t len, n;
   
                 len = rcs_buf_len(b1);                  len = buf_len(b1);
   
                 match = 1;                  match = 1;
                 for (n = 0; n < len; ++n)                  for (n = 0; n < len; ++n)
                         if (rcs_buf_getc(b1, n) != rcs_buf_getc(b2, n)) {                          if (buf_getc(b1, n) != buf_getc(b2, n)) {
                                 match = 0;                                  match = 0;
                                 break;                                  break;
                         }                          }
Line 211 
Line 211 
   
 out:  out:
         if (b1 != NULL)          if (b1 != NULL)
                 rcs_buf_free(b1);                  buf_free(b1);
         if (b2 != NULL)          if (b2 != NULL)
                 rcs_buf_free(b2);                  buf_free(b2);
         if (file != NULL)          if (file != NULL)
                 rcs_close(file);                  rcs_close(file);
 }  }

Legend:
Removed from v.1.50  
changed lines
  Added in v.1.51