Changeset 767 for trunk/coverager.c

Show
Ignore:
Timestamp:
04/18/2011 09:16:12 AM (2 years ago)
Author:
moo
Message:

check return value to avoid gcc warning

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/coverager.c

    r716 r767  
    172172    p[1] = covlines; 
    173173 
    174     ftruncate(fd, 0); 
     174    if (ftruncate(fd, 0) != 0) { 
     175        goto bailout; 
     176    } 
    175177    lseek(fd, 0, SEEK_SET); 
    176     write(fd, (char *) buf, size); 
     178    if (write(fd, (char *) buf, size) != size) { 
     179        goto bailout; 
     180    } 
    177181 
    178182bailout: