Ignore:
Timestamp:
11/07/06 11:29:09 (7 years ago)
Author:
perry
Message:

Deal properly with end of file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/format_legacy.c

    r952 r1078  
    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.