Print this page
        
@@ -20,12 +20,12 @@
  */
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2013 DEY Storage Systems, Inc.
  * Copyright (c) 2014 Gary Mills
- * Copyright 2016 Joyent, Inc.
  * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2016 Joyent, Inc.
  */
 
 /*
  * zlogin provides five types of login which allow users in the global
  * zone to access non-global zones.
@@ -283,11 +283,11 @@
             "%s/%s.%s", ZONES_TMPDIR, zname, suffix);
         if (connect(sockfd, (struct sockaddr *)&servaddr,
             sizeof (servaddr)) == -1) {
                 if (verbose)
                         zperror(gettext("Could not connect to zone"));
-                close(sockfd);
+                (void) close(sockfd);
                 return (-1);
         }
         return (sockfd);
 }
 
@@ -559,12 +559,12 @@
         struct winsize ws;
 
         if (ioctl(0, TIOCGWINSZ, &ws) == 0) {
                 if (ctlfd != -1) {
                         char buf[BUFSIZ];
-                        snprintf(buf, sizeof (buf), "TIOCSWINSZ %hu %hu\n",
-                            ws.ws_row, ws.ws_col);
+                        (void) snprintf(buf, sizeof (buf),
+                            "TIOCSWINSZ %hu %hu\n", ws.ws_row, ws.ws_col);
                         (void) send_ctl_sock(buf, strlen(buf));
                 } else {
                         (void) ioctl(masterfd, TIOCSWINSZ, &ws);
                 }
         }
@@ -578,11 +578,11 @@
 sigusr1(int s)
 {
         connect_flags ^= ZLOGIN_ZFD_EOF;
         if (ctlfd != -1) {
                 char buf[BUFSIZ];
-                snprintf(buf, sizeof (buf), "SETFLAGS %u\n",
+                (void) snprintf(buf, sizeof (buf), "SETFLAGS %u\n",
                     connect_flags);
                 (void) send_ctl_sock(buf, strlen(buf));
         }
 }
 
@@ -2215,11 +2215,11 @@
                 for (retry = 0; retry < MAX_RETRY; retry++) {
                         masterfd = connect_zone_sock(zonename,
                             (imode ? "server_ctl" : "console_sock"), B_FALSE);
                         if (masterfd != -1)
                                 break;
-                        sleep(1);
+                        (void) sleep(1);
                 }
 
                 if (retry == MAX_RETRY) {
                         zerror(gettext("unable to connect for %d seconds"),
                             MAX_RETRY);