From 2064b68718ea5f15de76d661ae1f307d67a0cf26 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 8 Dec 2014 22:39:07 +0100 Subject: with a few exceptions and some remaining files, never return directly on failure, always goto fail by invoking fail_if MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-registry/util.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mds-registry/util.c') diff --git a/src/mds-registry/util.c b/src/mds-registry/util.c index 1963eeb..6b383c2 100644 --- a/src/mds-registry/util.c +++ b/src/mds-registry/util.c @@ -76,14 +76,14 @@ int full_send(const char* message, size_t length) eprint("Sent more of a message than exists in the message, aborting."); return -1; } - else if ((sent < length) && (errno != EINTR)) - { - xperror(*argv); - return -1; - } + else + fail_if ((sent < length) && (errno != EINTR)); message += sent; length -= sent; } return 0; + fail: + xperror(*argv); + return -1; } -- cgit v1.2.3-70-g09d2