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

Diff for /src/usr.bin/rcs/buf.c between version 1.24 and 1.25

version 1.24, 2015/02/05 12:59:58 version 1.25, 2015/06/13 20:15:21
Line 32 
Line 32 
 #include <fcntl.h>  #include <fcntl.h>
 #include <stdint.h>  #include <stdint.h>
 #include <stdio.h>  #include <stdio.h>
   #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
   
Line 137 
Line 138 
 void  void
 buf_free(BUF *b)  buf_free(BUF *b)
 {  {
         if (b->cb_buf != NULL)          free(b->cb_buf);
                 xfree(b->cb_buf);          free(b);
         xfree(b);  
 }  }
   
 /*  /*
  * Free the buffer <b>'s structural information but do not free the contents   * Free the buffer <b>'s structural information but do not free the contents
  * of the buffer.  Instead, they are returned and should be freed later using   * of the buffer.  Instead, they are returned and should be freed later using
  * xfree().   * free().
  */   */
 void *  void *
 buf_release(BUF *b)  buf_release(BUF *b)
Line 153 
Line 153 
         void *tmp;          void *tmp;
   
         tmp = b->cb_buf;          tmp = b->cb_buf;
         xfree(b);          free(b);
         return (tmp);          return (tmp);
 }  }
   

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.25