Print this page
10137 smatch fixes for setuname
@@ -25,11 +25,13 @@
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.3 */
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
/*
* setuname [-t] [-s name] [-n node]
*/
@@ -450,11 +452,11 @@
sizeof (utsname.sysname));
if (nodename)
(void) strncpy(utsname.nodename, nodename,
sizeof (utsname.nodename));
(void) kvm_kwrite(kd, utsname_addr, &utsname, sizeof (utsname));
- kvm_close(kd);
+ (void) kvm_close(kd);
} else
return (-1);
#else /* sun */
if ((memfd = open("/dev/kmem", O_RDWR, 0)) > 0) {
if ((lseek(memfd, (long) utsname_addr, SEEK_SET) != -1) &&