summaryrefslogtreecommitdiff
path: root/usr/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib')
-rw-r--r--usr/src/lib/libbe/common/be_utils.c5
-rw-r--r--usr/src/lib/libproject/common/setproject.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/usr/src/lib/libbe/common/be_utils.c b/usr/src/lib/libbe/common/be_utils.c
index b29120c824..73eb416043 100644
--- a/usr/src/lib/libbe/common/be_utils.c
+++ b/usr/src/lib/libbe/common/be_utils.c
@@ -25,6 +25,7 @@
* Copyright 2016 Toomas Soome <tsoome@me.com>
* Copyright (c) 2015 by Delphix. All rights reserved.
* Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
+ * Copyright (c) 2018, Joyent, Inc.
*/
@@ -270,7 +271,7 @@ be_get_boot_args(char **fbarg, int entry)
"-B zfs-bootfs=%s,bootpath=\"%s\"\n", kernel,
kernel_options, node->be_root_ds, tmp);
- if (fbarg == NULL)
+ if (*fbarg == NULL)
ret = BE_ERR_NOMEM;
else
ret = 0;
@@ -3908,9 +3909,9 @@ be_create_menu(
if (mkdirp(menu_path,
S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) == -1 &&
errno != EEXIST) {
- free(menu_path);
be_print_err(gettext("be_create_menu: Failed to create the %s "
"directory: %s\n"), menu_path, strerror(errno));
+ free(menu_path);
return (errno_to_be_err(errno));
}
free(menu_path);
diff --git a/usr/src/lib/libproject/common/setproject.c b/usr/src/lib/libproject/common/setproject.c
index ef208845a1..f2ca827ee2 100644
--- a/usr/src/lib/libproject/common/setproject.c
+++ b/usr/src/lib/libproject/common/setproject.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2018, Joyent, Inc.
*/
@@ -501,7 +501,7 @@ bind_to_pool(const char *pool_name, pid_t pid, int force)
* 'system.bind-default' = 'true'.
*/
if ((pvals[0] = pool_value_alloc()) == NULL) {
- pool_conf_close(conf);
+ (void) pool_conf_close(conf);
pool_conf_free(conf);
return (-1);
}
@@ -510,7 +510,7 @@ bind_to_pool(const char *pool_name, pid_t pid, int force)
pool_value_get_bool(pvals[0], &bval) != PO_SUCCESS ||
bval == PO_FALSE) {
pool_value_free(pvals[0]);
- pool_conf_close(conf);
+ (void) pool_conf_close(conf);
pool_conf_free(conf);
errno = pool_name == NULL ? EACCES : ESRCH;
return (-1);
@@ -522,7 +522,7 @@ bind_to_pool(const char *pool_name, pid_t pid, int force)
* No default pools exist.
*/
pool_value_free(pvals[0]);
- pool_conf_close(conf);
+ (void) pool_conf_close(conf);
pool_conf_free(conf);
errno = pool_name == NULL ? EACCES : ESRCH;
return (-1);