Changeset c0cd256 for lib/format_duck.c


Ignore:
Timestamp:
08/21/06 21:07:27 (15 years ago)
Author:
Perry Lorier <perry@…>
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:
c28b5c7
Parents:
94af885
Message:

Remove old CONSTRUCTOR initialisation code, and only rely on the newer
trace_init() function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_duck.c

    r575c531 rc0cd256  
    155155                /* Read in the duck version from the start of the trace */
    156156                if ((numbytes = libtrace_io_read(INPUT->file, &version,
    157                                         sizeof(uint32_t))) == -1) {
     157                                        sizeof(version))) == sizeof(uint32_t)) {
    158158                        trace_set_err(libtrace, errno,
    159159                                        "Reading DUCK version failed");
     
    163163                        return 0;
    164164                }
    165                 INPUT->dag_version = version;
     165                INPUT->dag_version = bswap_le_to_host32(version);
    166166        }
    167167       
     
    218218        /* Writing the DUCK version will help with reading it back in later! */
    219219                if ((numbytes = libtrace_io_write(OUTPUT->file, &packet->type,
    220                                         sizeof(uint32_t))) != sizeof(uint32_t)){
     220                                sizeof(packet->type))) != sizeof(uint32_t)){
    221221                        trace_set_err_out(libtrace, errno,
    222222                                        "Writing DUCK version failed");
     
    301301};
    302302
    303 void CONSTRUCTOR duck_constructor() {
     303void duck_constructor() {
    304304        register_format(&duck);
    305305}       
Note: See TracChangeset for help on using the changeset viewer.