Changeset 767 in svn for trunk/mmap.c


Ignore:
Timestamp:
2011-04-18T07:16:12Z (4 years ago)
Author:
Xuefer
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.