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

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

version 1.4, 2017/01/03 06:53:20 version 1.5, 2019/07/05 07:34:40
Line 16 
Line 16 
  */   */
 /*  /*
  * log_xxx() routines are used to quickly store traces into a trace buffer.   * log_xxx() routines are used to quickly store traces into a trace buffer.
  * This allows trances to be collected during time sensitive operations without   * This allows traces to be collected during time sensitive operations without
  * disturbing them. The buffer can be flushed on standard error later, when   * disturbing them. The buffer can be flushed on standard error later, when
  * slow syscalls are no longer disruptive, e.g. at the end of the poll() loop.   * slow syscalls are no longer disruptive, e.g. at the end of the poll() loop.
  */   */
Line 50 
Line 50 
 void  void
 log_flush(void)  log_flush(void)
 {  {
         if (log_used ==  0)          if (log_used == 0)
                 return;                  return;
         write(STDERR_FILENO, log_buf, log_used);          write(STDERR_FILENO, log_buf, log_used);
         log_used = 0;          log_used = 0;
Line 140 
Line 140 
 }  }
   
 /*  /*
  * allocate a (small) amount of memory, and abort if it fails   * allocate 'size' bytes of memory (with size > 0). This functions never
    * fails (and never returns NULL), if there isn't enough memory then
    * abort the program.
  */   */
 void *  void *
 xmalloc(size_t size)  xmalloc(size_t size)

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