Changeset 767 for trunk/mmap.c


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

check return value to avoid gcc warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mmap.c

    r558 r767  
    187187        } 
    188188    } 
    189     ftruncate(fd, size); 
     189 
     190    if (ftruncate(fd, size) != 0) { 
     191        perror(shm->name); 
     192        errstr = "Failed to ftruncate the file"; 
     193        goto err; 
     194    } 
    190195#endif 
    191196 
Note: See TracChangeset for help on using the changeset viewer.