Changeset 5 for trunk/src/slib.c


Ignore:
Timestamp:
Dec 22, 2005, 11:52:26 PM (19 years ago)
Author:
rainer
Message:

Fixed a stupid bug in sh_files.c; released as 2.1.1a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/slib.c

    r1 r5  
    21602160        {
    21612161          byteread = read (fd, buf, count);
    2162           if (byteread > 0)
     2162          if (byteread != -1 && byteread != 0)
    21632163            {
    21642164              bytes += byteread; count -= byteread;
     
    22522252        } 
    22532253    } while ( byteread > 0 ||
    2254               ( byteread < 0 && (errno == EINTR || errno == EAGAIN))
     2254              ( byteread == -1 && (errno == EINTR || errno == EAGAIN))
    22552255              );
    22562256
     
    22972297          return (byteread);
    22982298        } 
    2299     } while ( byteread < 0 && (errno == EINTR || errno == EAGAIN));
     2299    } while ( byteread == -1 && (errno == EINTR || errno == EAGAIN));
    23002300
    23012301 
Note: See TracChangeset for help on using the changeset viewer.