diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-08 18:14:54 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-08 18:14:54 +0100 |
commit | a45a3204a0b093d6899249b18808692e3f8ac863 (patch) | |
tree | 8922112c324fda189a0571fd1bcc2685d21a1474 /src/mds-kbdc | |
parent | whenever fail_if gotos to the failure clause, print whence (diff) | |
download | mds-a45a3204a0b093d6899249b18808692e3f8ac863.tar.gz mds-a45a3204a0b093d6899249b18808692e3f8ac863.tar.bz2 mds-a45a3204a0b093d6899249b18808692e3f8ac863.tar.xz |
replace all goto pfail with fail_if, so that we can take whence it failed
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mds-kbdc')
-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 4a6a6ba..c47269a 100644 --- a/src/mds-kbdc/raw-data.c +++ b/src/mds-kbdc/raw-data.c @@ -130,8 +130,8 @@ static char* read_file(const char* restrict pathname, size_t* restrict size) /* Read a chunk of the file. */ got = read(fd, content + buf_ptr, (buf_size - buf_ptr) * sizeof(char)); if ((got < 0) && (errno == EINTR)) continue; - else if (got < 0) goto pfail; - else if (got == 0) break; + if (got == 0) break; + fail_if (got < 0); buf_ptr += (size_t)got; } |