--- old/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c	Fri Jan 25 18:07:27 2019
+++ new/usr/src/cmd/mdb/common/kmdb/kmdb_kvm.c	Fri Jan 25 18:07:27 2019
@@ -2388,8 +2388,7 @@
 	if (kmt->kmt_trapmap != NULL)
 		mdb_free(kmt->kmt_trapmap, BT_SIZEOFMAP(kmt->kmt_trapmax));
 
-	if (kmt != NULL)
-		mdb_free(kmt, sizeof (kmt_data_t));
+	mdb_free(kmt, sizeof (kmt_data_t));
 }
 
 static const mdb_tgt_ops_t kmt_ops = {
--- old/usr/src/cmd/mdb/common/mdb/mdb.c	Fri Jan 25 18:07:27 2019
+++ new/usr/src/cmd/mdb/common/mdb/mdb.c	Fri Jan 25 18:07:27 2019
@@ -24,7 +24,7 @@
  */
 /*
  * Copyright (c) 2012 by Delphix. All rights reserved.
- * Copyright (c) 2012 Joyent, Inc. All rights reserved.
+ * Copyright (c) 2018, Joyent, Inc.
  */
 
 /*
@@ -1155,7 +1155,7 @@
 	if (idcp->idc_tabp == NULL)
 		return;
 
-	idcp->idc_tabp(mcp, flags, argc, argv);
+	(void) idcp->idc_tabp(mcp, flags, argc, argv);
 }
 
 /*
--- old/usr/src/cmd/mdb/common/mdb/mdb_cmds.c	Fri Jan 25 18:07:27 2019
+++ new/usr/src/cmd/mdb/common/mdb/mdb_cmds.c	Fri Jan 25 18:07:27 2019
@@ -1520,9 +1520,9 @@
 		return ("[ stack ]");
 	if (map->map_flags & MDB_TGT_MAP_ANON)
 		return ("[ anon ]");
-	if (map->map_name != NULL)
-		return (map->map_name);
-	return ("[ unknown ]");
+	if (map->map_name[0] == '\0')
+		return ("[ unknown ]");
+	return (map->map_name);
 }
 
 /*ARGSUSED*/
@@ -2343,7 +2343,7 @@
 	const char *c;
 	mdb_pipe_t p;
 
-	if (!flags & DCMD_PIPE)
+	if (!(flags & DCMD_PIPE))
 		return (DCMD_USAGE);
 
 	if (argc == 1 || argc == 2) {
--- old/usr/src/cmd/mdb/common/mdb/mdb_nm.c	Fri Jan 25 18:07:27 2019
+++ new/usr/src/cmd/mdb/common/mdb/mdb_nm.c	Fri Jan 25 18:07:27 2019
@@ -23,6 +23,10 @@
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
 #include <sys/elf.h>
 #include <sys/elf_SPARC.h>
 
@@ -785,7 +789,7 @@
 		for (symp = syms; nsyms-- != 0; symp++) {
 			nii.nii_fp = symp->nm_fp;
 
-			callback(&nii, &symp->nm_sym, symp->nm_name,
+			(void) callback(&nii, &symp->nm_sym, symp->nm_name,
 			    &symp->nm_si, symp->nm_object);
 		}
 
--- old/usr/src/cmd/mdb/common/mdb/mdb_proc.c	Fri Jan 25 18:07:28 2019
+++ new/usr/src/cmd/mdb/common/mdb/mdb_proc.c	Fri Jan 25 18:07:28 2019
@@ -1990,8 +1990,7 @@
 	(void) mdb_nv_insert(&pt->p_env, name, NULL, (uintptr_t)val,
 	    MDB_NV_EXTNAME);
 
-	if (equals)
-		*equals = '=';
+	*equals = '=';
 }
 
 /*
--- old/usr/src/cmd/mdb/common/mdb/mdb_tab.c	Fri Jan 25 18:07:28 2019
+++ new/usr/src/cmd/mdb/common/mdb/mdb_tab.c	Fri Jan 25 18:07:28 2019
@@ -20,7 +20,7 @@
  */
 /*
  * Copyright (c) 2013 by Delphix. All rights reserved.
- * Copyright (c) 2012 Joyent, Inc. All rights reserved.
+ * Copyright (c) 2018, Joyent, Inc.
  * Copyright (c) 2013 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
  */
 /*
@@ -403,8 +403,7 @@
 	 * If we have a match set, then we want to verify that we actually match
 	 * it.
 	 */
-	if (mcp->mtc_base != NULL &&
-	    strncmp(name, mcp->mtc_base, strlen(mcp->mtc_base)) != 0)
+	if (strncmp(name, mcp->mtc_base, strlen(mcp->mtc_base)) != 0)
 		return;
 
 	v = mdb_nv_lookup(&mcp->mtc_nv, name);
@@ -443,13 +442,7 @@
 const char *
 mdb_tab_match(mdb_tab_cookie_t *mcp)
 {
-	size_t blen;
-
-	if (mcp->mtc_base == NULL)
-		blen = 0;
-	else
-		blen = strlen(mcp->mtc_base);
-	return (mcp->mtc_match + blen);
+	return (mcp->mtc_match + strlen(mcp->mtc_base));
 }
 
 void
--- old/usr/src/cmd/mdb/common/modules/crypto/spi.c	Fri Jan 25 18:07:28 2019
+++ new/usr/src/cmd/mdb/common/modules/crypto/spi.c	Fri Jan 25 18:07:28 2019
@@ -24,6 +24,10 @@
  */
 
 /*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
+/*
  * mdb dcmds for selected structures from
  * usr/src/uts/common/sys/crypto/spi.h
  *
@@ -191,7 +195,7 @@
 	crypto_mech_info_t minfo;
 	const char *unit = "bits";
 
-	if (! flags & DCMD_ADDRSPEC)
+	if (!(flags & DCMD_ADDRSPEC))
 		return (DCMD_USAGE);
 
 	if (mdb_vread(&minfo, sizeof (crypto_mech_info_t), addr)
--- old/usr/src/cmd/mdb/common/modules/fcp/fcp.c	Fri Jan 25 18:07:28 2019
+++ new/usr/src/cmd/mdb/common/modules/fcp/fcp.c	Fri Jan 25 18:07:28 2019
@@ -22,7 +22,7 @@
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  *
- * FCP mdb module
+ * Copyright (c) 2018, Joyent, Inc.
  */
 
 
@@ -328,8 +328,8 @@
 
 	tgt_hash_index = 0;
 
-	while ((port.port_tgt_hash_table[tgt_hash_index] == NULL) &&
-	    (tgt_hash_index < FCP_NUM_HASH)) {
+	while (tgt_hash_index < FCP_NUM_HASH &&
+	    port.port_tgt_hash_table[tgt_hash_index] == NULL) {
 		tgt_hash_index++;
 	}
 
@@ -369,10 +369,9 @@
 
 		tgt_hash_index++;
 
-		while ((port.port_tgt_hash_table[tgt_hash_index] == NULL) &&
-		    (tgt_hash_index < FCP_NUM_HASH)) {
+		while (tgt_hash_index < FCP_NUM_HASH &&
+		    port.port_tgt_hash_table[tgt_hash_index] == NULL)
 			tgt_hash_index++;
-		}
 
 		if (tgt_hash_index == FCP_NUM_HASH) {
 			/* You're done */
--- old/usr/src/cmd/mdb/common/modules/fctl/fctl.c	Fri Jan 25 18:07:28 2019
+++ new/usr/src/cmd/mdb/common/modules/fctl/fctl.c	Fri Jan 25 18:07:28 2019
@@ -23,6 +23,9 @@
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
 
 #include <sys/mdb_modapi.h>
 #include <sys/mutex.h>
@@ -1109,7 +1112,7 @@
 		return (DCMD_USAGE);
 	}
 
-	if (logq.il_flags & FC_TRACE_LOGQ_V2 != 0) {
+	if ((logq.il_flags & FC_TRACE_LOGQ_V2) != 0) {
 		rval = fc_dump_logmsg((fc_trace_dmsg_t *)logq.il_msgh, pktstart,
 		    pktend, &printed);
 	} else {
--- old/usr/src/cmd/mdb/common/modules/genunix/ndievents.c	Fri Jan 25 18:07:28 2019
+++ new/usr/src/cmd/mdb/common/modules/genunix/ndievents.c	Fri Jan 25 18:07:28 2019
@@ -24,7 +24,9 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
 
 #include "ndievents.h"
 #include <sys/sunndi.h>
@@ -80,7 +82,7 @@
 	}
 
 	if (device->devi_node_state < DS_INITIALIZED) {
-		strncpy(addr_str, '\0', sizeof ('\0'));
+		addr_str[0] = '\0';
 	} else {
 		addr = device->devi_addr;
 		if (mdb_readstr(addr_str, sizeof (addr_str),
--- old/usr/src/cmd/mdb/common/modules/libumem/umem.c	Fri Jan 25 18:07:28 2019
+++ new/usr/src/cmd/mdb/common/modules/libumem/umem.c	Fri Jan 25 18:07:28 2019
@@ -24,7 +24,7 @@
  */
 
 /*
- * Copyright 2012 Joyent, Inc.  All rights reserved.
+ * Copyright (c) 2018, Joyent, Inc.
  * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
  */
 
@@ -2116,7 +2116,7 @@
 		    (vs->vs_type == VMEM_ALLOC) ? "allocated" : "freed",
 		    wi->wi_vmem->vm_name);
 
-		if (!mdb_whatis_flags(w) & WHATIS_QUIET)
+		if (!(mdb_whatis_flags(w) & WHATIS_QUIET))
 			whatis_call_printer(vmem_seg, addr);
 		else
 			mdb_printf("\n");
--- old/usr/src/cmd/mdb/intel/mdb/proc_amd64dep.c	Fri Jan 25 18:07:29 2019
+++ new/usr/src/cmd/mdb/intel/mdb/proc_amd64dep.c	Fri Jan 25 18:07:29 2019
@@ -309,8 +309,6 @@
 	/*
 	 * Decode precision, rounding, and infinity options in control word.
 	 */
-	if (cw & FPSIG24)
-		p += mdb_snprintf(p, (size_t)(end - p), "|SIG24");
 	if (cw & FPSIG53)
 		p += mdb_snprintf(p, (size_t)(end - p), "|SIG53");
 	if (cw & FPSIG64)
--- old/usr/src/cmd/mdb/intel/mdb/proc_ia32dep.c	Fri Jan 25 18:07:29 2019
+++ new/usr/src/cmd/mdb/intel/mdb/proc_ia32dep.c	Fri Jan 25 18:07:29 2019
@@ -24,7 +24,7 @@
  * Use is subject to license terms.
  */
 /*
- * Copyright 2015 Joyent, Inc.
+ * Copyright (c) 2018, Joyent, Inc.
  */
 
 /*
@@ -250,8 +250,6 @@
 	/*
 	 * Decode precision, rounding, and infinity options in control word.
 	 */
-	if (cw & FPSIG24)
-		p += mdb_snprintf(p, (size_t)(end - p), "|SIG24");
 	if (cw & FPSIG53)
 		p += mdb_snprintf(p, (size_t)(end - p), "|SIG53");
 	if (cw & FPSIG64)
