Changeset ac96828


Ignore:
Timestamp:
08/13/04 10:30:23 (16 years ago)
Author:
Daniel Lawson <dlawson@…>
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:
82f2b7b
Parents:
299e9a0
Message:

more sensible ptr arithmetic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/trace.c

    re5d3718 rac96828  
    479479
    480480        /* If we're reading from an ERF input, it's an offline trace. We can make some assumptions */
    481        
     481        
    482482        if (libtrace->format == ERF) {
    483483                void *buffer2 = buffer;
     
    494494                size = ntohs(((dag_record_t *)buffer)->rlen) - sizeof(dag_record_t);
    495495                assert(size < LIBTRACE_PACKET_BUFSIZE);
    496                 buffer2 += sizeof(dag_record_t);
     496                buffer2 = (ptrdiff_t)buffer + sizeof(dag_record_t);
    497497
    498498                // read in the rest of the packet
     
    506506                return sizeof(dag_record_t) + numbytes;
    507507        }
     508       
    508509        do {
    509510                if (fifo_out_available(libtrace->fifo) == 0 || read_required) {
Note: See TracChangeset for help on using the changeset viewer.