diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-08-21 20:43:01 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-08-21 20:43:01 +0200 |
commit | 16b25c8a426c285c85c24db115c677218d287da9 (patch) | |
tree | 7712ef9bc069da7836bcf492edc5ca915d8ceb5e /src/mds-kbdc/raw-data.c | |
parent | m info (diff) | |
download | mds-16b25c8a426c285c85c24db115c677218d287da9.tar.gz mds-16b25c8a426c285c85c24db115c677218d287da9.tar.bz2 mds-16b25c8a426c285c85c24db115c677218d287da9.tar.xz |
add and use xclose and xfclose, we do not want close or fclose to be ignored because a singal interrupts it.
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds-kbdc/raw-data.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mds-kbdc/raw-data.c b/src/mds-kbdc/raw-data.c index 78d1939..a3b8ee4 100644 --- a/src/mds-kbdc/raw-data.c +++ b/src/mds-kbdc/raw-data.c @@ -140,7 +140,7 @@ static char* read_file(const char* restrict pathname, size_t* restrict size) fail_if (xxrealloc(old, content, buf_ptr, char)); /* Close file decriptor for the file. */ - close(fd); + xclose(fd); *size = buf_ptr; return content; @@ -150,7 +150,7 @@ static char* read_file(const char* restrict pathname, size_t* restrict size) free(old); free(content); if (fd >= 0) - close(fd); + xclose(fd); return NULL; } |