diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-11-06 18:29:24 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-11-06 18:29:24 +0100 |
commit | 5f7e83e8ad6f83095569c452bff2d0702ac02987 (patch) | |
tree | b3da212aea0a9ff2e7502c3c64c999f82639370e /src/socket-proxy/socket-proxyd.c | |
parent | eb9da376d76b48585b3b63b4f91903b54f7abd36 (diff) |
socket-proxy: clean-up indenting
Diffstat (limited to 'src/socket-proxy/socket-proxyd.c')
-rw-r--r-- | src/socket-proxy/socket-proxyd.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c index 8f60ab88f1..a449b0eec4 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -110,11 +110,11 @@ static int remove_event_from_connection(struct connection *c, uint32_t events) { } if (c->events == 0) { - r = sd_event_source_set_enabled(c->w, SD_EVENT_OFF); - if (r < 0) { - log_error("Error %d disabling source: %s", r, strerror(-r)); - return r; - } + r = sd_event_source_set_enabled(c->w, SD_EVENT_OFF); + if (r < 0) { + log_error("Error %d disabling source: %s", r, strerror(-r)); + return r; + } } return 0; @@ -155,11 +155,11 @@ static int send_buffer(struct connection *sender) { /* If the buffer is full, disable events coming for recv. */ if (sender->buffer_filled_len == BUFFER_SIZE) { - r = remove_event_from_connection(sender, EPOLLIN); - if (r < 0) { - log_error("Error %d disabling EPOLLIN for fd=%d: %s", r, sender->fd, strerror(-r)); - return r; - } + r = remove_event_from_connection(sender, EPOLLIN); + if (r < 0) { + log_error("Error %d disabling EPOLLIN for fd=%d: %s", r, sender->fd, strerror(-r)); + return r; + } } /* Watch for when the recipient can be sent data again. */ @@ -218,8 +218,7 @@ static int transfer_data_cb(sd_event_source *s, int fd, uint32_t revents, void * if (errno != EWOULDBLOCK && errno != EAGAIN) { log_error("Error %d in recv from fd=%d: %m", errno, fd); return -errno; - } - else { + } else { /* recv() is in a blocking state. */ break; } @@ -280,7 +279,7 @@ static int connected_to_server_cb(sd_event_source *s, int fd, uint32_t revents, } c_client_to_server->events = EPOLLIN; -goto finish; + goto finish; fail: free_connection(c_client_to_server); |