return EXIT_FAILURE on failure
This commit is contained in:
parent
78b3dab63e
commit
c8e489d4c9
|
@ -39,6 +39,9 @@ main()
|
||||||
csfd = get_client_socket();
|
csfd = get_client_socket();
|
||||||
addr = get_client_addr();
|
addr = get_client_addr();
|
||||||
|
|
||||||
|
if(!addr || csfd < 0)
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
|
||||||
while(fgets(buf, sizeof(buf), stdin))
|
while(fgets(buf, sizeof(buf), stdin))
|
||||||
if(sendto(csfd, buf, a_strlen(buf), MSG_NOSIGNAL,
|
if(sendto(csfd, buf, a_strlen(buf), MSG_NOSIGNAL,
|
||||||
(const struct sockaddr *) addr, sizeof(struct sockaddr_un)) == -1)
|
(const struct sockaddr *) addr, sizeof(struct sockaddr_un)) == -1)
|
||||||
|
|
Loading…
Reference in New Issue