From beaa422f61e6f9a5825e584c119d8d24fdd3f89d Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 27 Apr 2015 01:04:40 +0200 Subject: m whitespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/bus.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/bus.c b/src/bus.c index 25bfbd8..ff2abeb 100644 --- a/src/bus.c +++ b/src/bus.c @@ -595,6 +595,7 @@ bus_close(bus_t *bus) t(close_shared_memory(bus)); bus->message = NULL; return 0; + fail: return -1; } @@ -622,6 +623,7 @@ bus_write(const bus_t *bus, const char *message) t(acquire_semaphore(bus, N, SEM_UNDO)); state--; t(release_semaphore(bus, X, SEM_UNDO)); return 0; + fail: saved_errno = errno; if (state > 0) @@ -674,6 +676,7 @@ bus_read(const bus_t *bus, int (*callback)(const char *message, void *user_data) t(release_semaphore(bus, S, SEM_UNDO)); state--; t(acquire_semaphore(bus, W, SEM_UNDO)); state--; } + fail: saved_errno = errno; if (state > 1) @@ -722,6 +725,7 @@ bus_poll(bus_t *bus) t(release_semaphore(bus, Q, 0)); t(zero_semaphore(bus, Q, 0)); return bus->message; + fail: saved_errno = errno; if (state > 1) -- cgit v1.2.3-70-g09d2