From f647962d64e844689f3e2acfce6102fc47e76df2 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Fri, 28 Nov 2014 18:50:43 +0100 Subject: treewide: yet more log_*_errno + return simplifications Using: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg; print;' $f done And a couple of manual whitespace fixups. --- src/journal-remote/journal-remote.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/journal-remote/journal-remote.c') diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index 32e2d33e99..78385538b4 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -653,10 +653,8 @@ static int setup_microhttpd_server(RemoteServer *s, assert(fd >= 0); r = fd_nonblock(fd, true); - if (r < 0) { - log_error_errno(r, "Failed to make fd:%d nonblocking: %m", fd); - return r; - } + if (r < 0) + return log_error_errno(r, "Failed to make fd:%d nonblocking: %m", fd); if (key) { assert(cert); -- cgit v1.2.3-54-g00ecf