Changeset 7e28dcf


Ignore:
Timestamp:
11/07/06 11:29:09 (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:
07757fd
Parents:
221b624
Message:

Deal properly with end of file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/format_legacy.c

    r85a79b0 r7e28dcf  
    132132        if ((numbytes=libtrace_io_read(INPUT.file,
    133133                                        buffer,
    134                                         64)) == -1) {
    135                 trace_set_err(libtrace,errno,"read(%s)",libtrace->uridata);
    136                 return -1;
     134                                        64)) != 64) {
     135                if (numbytes!=0) {
     136                        trace_set_err(libtrace,errno,"read(%s)",libtrace->uridata);
     137                }
     138                return numbytes;
    137139        }
    138140       
Note: See TracChangeset for help on using the changeset viewer.