- Timestamp:
- 09/18/06 23:11:38 (16 years ago)
- Branches:
- 4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, getfragoff, help, libtrace4, master, ndag_format, pfring, rc-4.0.1, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance, ringtimestampfixes
- Children:
- 3eff1c8
- Parents:
- 279486e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/trace.c
r755e794 rd694056 117 117 static char *xstrndup(const char *src,size_t n) 118 118 { 119 char *ret=(char*)malloc(n+1); 119 char *ret=(restrict char*)malloc(n+1); 120 if (ret==NULL) { 121 fprintf(stderr,"Out of memory"); 122 exit(EXIT_FAILURE); 123 } 120 124 xstrncpy(ret,src,n); 121 125 return ret; … … 294 298 295 299 assert(uri && "Passing NULL to trace_create makes me a very sad program"); 300 301 if (!libtrace) { 302 /* Out of memory */ 303 return NULL; 304 } 296 305 297 306 libtrace->err.err_num = TRACE_ERR_NOERROR; … … 458 467 switch(libtrace->format->init_output(libtrace)) { 459 468 case -1: /* failure */ 460 free(libtrace);461 469 return libtrace; 462 470 case 0: /* success */
Note: See TracChangeset
for help on using the changeset viewer.