From c8e489d4c97b0dc725ddf855c6ea5dc1b6fc7620 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 29 Oct 2007 16:20:11 +0100 Subject: [PATCH] return EXIT_FAILURE on failure --- awesome-client.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/awesome-client.c b/awesome-client.c index 9b72a2aa..d304352c 100644 --- a/awesome-client.c +++ b/awesome-client.c @@ -39,6 +39,9 @@ main() csfd = get_client_socket(); addr = get_client_addr(); + if(!addr || csfd < 0) + return EXIT_FAILURE; + while(fgets(buf, sizeof(buf), stdin)) if(sendto(csfd, buf, a_strlen(buf), MSG_NOSIGNAL, (const struct sockaddr *) addr, sizeof(struct sockaddr_un)) == -1)