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

Diff for /src/usr.bin/aucat/utils.c between version 1.4 and 1.5

version 1.4, 2016/09/30 08:43:23 version 1.5, 2017/01/03 07:25:16
Line 24 
Line 24 
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
 #include <unistd.h>  #include <unistd.h>
   #include <fcntl.h>
 #include "utils.h"  #include "utils.h"
   
 /*  /*
Line 95 
Line 96 
 }  }
   
 /*  /*
  * store a unsigned decimal in the log   * store an unsigned decimal in the log
  */   */
 void  void
 log_putu(unsigned long num)  log_putu(unsigned long num)
Line 139 
Line 140 
 }  }
   
 /*  /*
  * allocate a (small) abount of memory, and abort if it fails   * allocate a (small) amount of memory, and abort if it fails
  */   */
 void *  void *
 xmalloc(size_t size)  xmalloc(size_t size)
Line 154 
Line 155 
                 panic();                  panic();
         }          }
         return p;          return p;
   }
   
   /*
    * free memory allocated with xmalloc()
    */
   void
   xfree(void *p)
   {
   #ifdef DEBUG
           if (p == NULL) {
                   log_puts("xfree with NULL arg\n");
                   panic();
           }
   #endif
           free(p);
 }  }
   
 /*  /*

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