summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2018-12-18 19:59:18 +0000
committerJohn Levon <john.levon@joyent.com>2019-03-20 17:33:24 -0700
commitfeb176ed7e0a1726bd78c575ee5225ae49b5b0a8 (patch)
treea5ad91ec44d7f213fcb5bfb26c75b2d7479056f0
parentfefb716a9c60aee35065c9c8fb74b17ccf5ae303 (diff)
downloadillumos-joyent-feb176ed7e0a1726bd78c575ee5225ae49b5b0a8.tar.gz
10108 libstmfproxy needs smatch fixes
Reviewed by: Andy Stormont <astormont@racktopsystems.com> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
-rw-r--r--usr/src/lib/libstmfproxy/common/stmftransport.c10
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);