summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2018-12-19 18:40:41 +0000
committerJohn Levon <john.levon@joyent.com>2019-03-30 14:09:24 -0700
commit720c4860f9da1099f11e91ddd7f4d0edaf46c20a (patch)
tree26cd862251a769e37b43e5b6be242a8eed973f0e
parent7bb60aaa60bddb378dcbf2dde6bdf8a92d431c55 (diff)
downloadillumos-gate-720c4860f9da1099f11e91ddd7f4d0edaf46c20a.tar.gz
10135 picl plugins need smatch fixes
Reviewed by: Andy Fiddaman <andy@omniosce.org> Reviewed by: Gergő Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/picl/plugins/common/devtree/picldevtree.c8
-rw-r--r--usr/src/cmd/picl/plugins/common/memcfg/piclmemcfg_comm.c6
2 files changed, 10 insertions, 4 deletions
diff --git a/usr/src/cmd/picl/plugins/common/devtree/picldevtree.c b/usr/src/cmd/picl/plugins/common/devtree/picldevtree.c
index 3a0327af3f..ab02d9091b 100644
--- a/usr/src/cmd/picl/plugins/common/devtree/picldevtree.c
+++ b/usr/src/cmd/picl/plugins/common/devtree/picldevtree.c
@@ -24,6 +24,10 @@
*/
/*
+ * Copyright (c) 2018, Joyent, Inc.
+ */
+
+/*
* PICL plug-in that creates device tree nodes for all platforms
*/
@@ -1770,7 +1774,7 @@ static int
is_snapshot_stale(di_node_t root)
{
snapshot_stale = 0;
- di_walk_node(root, DI_WALK_CLDFIRST, NULL, check_stale_node);
+ (void) di_walk_node(root, DI_WALK_CLDFIRST, NULL, check_stale_node);
return (snapshot_stale);
}
@@ -2546,8 +2550,8 @@ get_asr_export_list(char **exportlist, int *exportlistlen)
return (0);
}
(void) memcpy(*exportlist, opp->oprom_array, opp->oprom_size);
- free(opp);
*exportlistlen = opp->oprom_size;
+ free(opp);
(void) close(d);
return (1);
}
diff --git a/usr/src/cmd/picl/plugins/common/memcfg/piclmemcfg_comm.c b/usr/src/cmd/picl/plugins/common/memcfg/piclmemcfg_comm.c
index ecda8213a9..df5b34d8d3 100644
--- a/usr/src/cmd/picl/plugins/common/memcfg/piclmemcfg_comm.c
+++ b/usr/src/cmd/picl/plugins/common/memcfg/piclmemcfg_comm.c
@@ -21,6 +21,8 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2018, Joyent, Inc.
*/
/*
@@ -422,9 +424,9 @@ create_logical_tree(picl_nodehdl_t memh, int fd)
/*
* Add property, Size to memory-segment node
*/
- if ((ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION,
+ err = ptree_init_propinfo(&propinfo, PTREE_PROPINFO_VERSION,
PICL_PTYPE_UNSIGNED_INT, PICL_READ, sizeof (mcseg->size),
- PICL_PROP_SIZE, NULL, NULL)) != PICL_SUCCESS)
+ PICL_PROP_SIZE, NULL, NULL);
if (err != PICL_SUCCESS)
break;