diff options
author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-03-21 12:01:01 +0000 |
---|---|---|
committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2019-03-21 12:01:01 +0000 |
commit | aa302656385001628e17e2a5f29a9b9f9ba70efe (patch) | |
tree | 1029ebec708799c97e230f63271cbc71b3e98616 | |
parent | 52767bdcffaf8c9d0a1cbfac8fa46b8506ee88cd (diff) | |
parent | feb176ed7e0a1726bd78c575ee5225ae49b5b0a8 (diff) | |
download | illumos-joyent-aa302656385001628e17e2a5f29a9b9f9ba70efe.tar.gz |
[illumos-gate merge]
commit feb176ed7e0a1726bd78c575ee5225ae49b5b0a8
10108 libstmfproxy needs smatch fixes
-rw-r--r-- | usr/src/lib/libstmfproxy/common/stmftransport.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/src/lib/libstmfproxy/common/stmftransport.c b/usr/src/lib/libstmfproxy/common/stmftransport.c index eb392a2480..2d81769223 100644 --- a/usr/src/lib/libstmfproxy/common/stmftransport.c +++ b/usr/src/lib/libstmfproxy/common/stmftransport.c @@ -23,6 +23,10 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2018, Joyent, Inc. + */ + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -121,7 +125,7 @@ pt_socket_connect(int server_node, char *server) sh = malloc(sizeof (*sh)); sh->sockfd = new_sfd; serv_out: - close(sfd); + (void) close(sfd); } else { struct hostent *hp; @@ -151,7 +155,7 @@ serv_out: while (connect(sfd, (struct sockaddr *)&sin, sizeof (sin)) < 0) { - close(sfd); + (void) close(sfd); if (errno == ECONNREFUSED) { /* get a fresh socket and retry */ sfd = socket(AF_INET, SOCK_STREAM, 0); @@ -160,7 +164,7 @@ serv_out: "socket() call failed: %d", errno); return (NULL); } - sleep(2); + (void) sleep(2); } else { syslog(LOG_DAEMON|LOG_CRIT, "Cannot connect %s - %d", server, errno); |