summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-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;