chiark / gitweb /
fix a couple of more lazy "return -1"
[elogind.git] / src / reply-password / reply-password.c
index c730216b73c6aacf4d17536078357f1586d63f6e..73c2d1bbdfbbf34ccab6ff2e584e7b55ff7eb39c 100644 (file)
@@ -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;