Changeset d0cae69


Ignore:
Timestamp:
06/27/13 14:09:28 (7 years ago)
Author:
Shane Alcock <salcock@…>
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:
f5b5cca
Parents:
b8826aa
Message:
  • Don't try to print a NULL output format
  • Create a proper #define for the default output format so that we can easily change it in the future
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/tracertstats/tracertstats.c

    rb8826aa rd0cae69  
    6161#endif
    6262
     63#define DEFAULT_OUTPUT_FMT "txt"
     64
    6365struct libtrace_t *trace;
    6466char *output_format=NULL;
     
    99101        int i;
    100102       
    101         output=output_init(title,output_format?output_format:"txt");
     103        output=output_init(title,output_format?output_format:DEFAULT_OUTPUT_FMT);
    102104        if (!output) {
    103105                fprintf(stderr,"Failed to create output file\n");
     
    276278                return 0;
    277279
    278         fprintf(stderr,"output format: '%s'\n",output_format);
     280        if (output_format)
     281                fprintf(stderr,"output format: '%s'\n",output_format);
     282        else
     283                fprintf(stderr,"output format: '%s'\n", DEFAULT_OUTPUT_FMT);
    279284       
    280285       
Note: See TracChangeset for help on using the changeset viewer.