From a45a3204a0b093d6899249b18808692e3f8ac863 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 8 Dec 2014 18:14:54 +0100 Subject: replace all goto pfail with fail_if, so that we can take whence it failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-kbdc/raw-data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mds-kbdc') 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; } -- cgit v1.2.3-70-g09d2