Changeset 767 for trunk/coverager.c


Ignore:
Timestamp:
2011-04-18T09:16:12+02:00 (4 years ago)
Author:
moo
Message:

check return value to avoid gcc warning

File:
1 edited

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: 
Note: See TracChangeset for help on using the changeset viewer.