From 7e8185ef942de5acecfa4cda03d7d7711ddda992 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 11 Aug 2014 18:35:54 +0200 Subject: fix a couple of more lazy "return -1" Fix should strictly follow the rule to return negative errno-style error codes from functions, hence let's fix more "return -1"-style lazinesses. --- src/reply-password/reply-password.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/reply-password') diff --git a/src/reply-password/reply-password.c b/src/reply-password/reply-password.c index c730216b73..73c2d1bbdf 100644 --- a/src/reply-password/reply-password.c +++ b/src/reply-password/reply-password.c @@ -53,7 +53,7 @@ static int send_on_socket(int fd, const char *socket_name, const void *packet, s if (sendto(fd, packet, size, MSG_NOSIGNAL, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(socket_name)) < 0) { log_error("Failed to send: %m"); - return -1; + return -errno; } return 0; -- cgit v1.2.3-54-g00ecf