Changeset d7d3267 for lib/format_helper.c
- Timestamp:
- 11/29/18 13:37:20 (2 years ago)
- Branches:
- develop
- Children:
- 50e9c6b
- Parents:
- 54642da (diff), fdf23b8 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lib/format_helper.c
r412550d rd7d3267 39 39 #include "format_helper.h" 40 40 41 #include <assert.h>42 41 #include <stdarg.h> 43 42 … … 69 68 struct timeval tv; 70 69 71 assert(trace != NULL); 72 assert(packet != NULL); 73 70 if (!trace) { 71 fprintf(stderr, "NULL trace passed into trace_event_device()\n"); 72 event.type = TRACE_EVENT_TERMINATE; 73 return event; 74 } 75 if (!packet) { 76 trace_set_err(trace, TRACE_ERR_NULL_PACKET, "NULL packet passed into trace_event_device()"); 77 event.type = TRACE_EVENT_TERMINATE; 78 return event; 79 } 80 74 81 FD_ZERO(&rfds); 75 82 FD_ZERO(&rfds_param); … … 292 299 va_list va; 293 300 va_start(va,msg); 294 assert(errcode != 0 && "An error occurred, but it is unknown what it is"); 301 302 if (errcode == 0) { 303 fprintf(stderr, "An error occurred, but it is unknown what it is"); 304 return; 305 } 306 295 307 trace->err.err_num=errcode; 296 308 if (errcode>0) { … … 315 327 va_list va; 316 328 va_start(va,msg); 317 assert(errcode != 0 && "An error occurred, but it is unknown what it is"); 329 if (errcode == 0) { 330 fprintf(stderr, "An error occurred, but is is unknown what is is"); 331 return; 332 } 318 333 trace->err.err_num=errcode; 319 334 if (errcode>0) {
Note: See TracChangeset
for help on using the changeset viewer.