From: Lennart Poettering Date: Mon, 9 Mar 2015 17:16:54 +0000 (+0100) Subject: fsckd: the error code is actually returned in 'fd' X-Git-Tag: v219.0~453 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=adfe5671ef794099068038dfccbf1eb5134433c8 fsckd: the error code is actually returned in 'fd' Also, we don't use {} for single-line if-blocks. --- diff --git a/src/fsckd/fsckd.c b/src/fsckd/fsckd.c index df413fbb8..d4e9896e9 100644 --- a/src/fsckd/fsckd.c +++ b/src/fsckd/fsckd.c @@ -520,12 +520,12 @@ int main(int argc, char *argv[]) { if (n > 1) { log_error("Too many file descriptors received."); return EXIT_FAILURE; - } else if (n == 1) { + } else if (n == 1) fd = SD_LISTEN_FDS_START + 0; - } else { + else { fd = make_socket_fd(LOG_DEBUG, FSCKD_SOCKET_PATH, SOCK_STREAM | SOCK_CLOEXEC); if (fd < 0) { - log_error_errno(r, "Couldn't create listening socket fd on %s: %m", FSCKD_SOCKET_PATH); + log_error_errno(fd, "Couldn't create listening socket fd on %s: %m", FSCKD_SOCKET_PATH); return EXIT_FAILURE; } }