summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/zfs/zcp.c
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-19 21:05:21 +0200
committerToomas Soome <tsoome@me.com>2019-04-23 20:08:28 +0300
commitdd328bf6d39366b8d7bde6a36114538fc14332dd (patch)
treef16c6fdd5189d28715eccceb00227266f27bd5f7 /usr/src/uts/common/fs/zfs/zcp.c
parentfd7977362aae2eaa5dcb89671159f4fd82f22ca1 (diff)
downloadillumos-gate-dd328bf6d39366b8d7bde6a36114538fc14332dd.tar.gz
10731 zfs: NULL pointer errors
Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/common/fs/zfs/zcp.c')
-rw-r--r--usr/src/uts/common/fs/zfs/zcp.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr/src/uts/common/fs/zfs/zcp.c b/usr/src/uts/common/fs/zfs/zcp.c
index a3ac9a9824..61ce60a233 100644
--- a/usr/src/uts/common/fs/zfs/zcp.c
+++ b/usr/src/uts/common/fs/zfs/zcp.c
@@ -593,23 +593,23 @@ zcp_dataset_hold_error(lua_State *state, dsl_pool_t *dp, const char *dsname,
{
if (error == ENOENT) {
(void) zcp_argerror(state, 1, "no such dataset '%s'", dsname);
- return (NULL); /* not reached; zcp_argerror will longjmp */
+ return (0); /* not reached; zcp_argerror will longjmp */
} else if (error == EXDEV) {
(void) zcp_argerror(state, 1,
"dataset '%s' is not in the target pool '%s'",
dsname, spa_name(dp->dp_spa));
- return (NULL); /* not reached; zcp_argerror will longjmp */
+ return (0); /* not reached; zcp_argerror will longjmp */
} else if (error == EIO) {
(void) luaL_error(state,
"I/O error while accessing dataset '%s'", dsname);
- return (NULL); /* not reached; luaL_error will longjmp */
+ return (0); /* not reached; luaL_error will longjmp */
} else if (error != 0) {
(void) luaL_error(state,
"unexpected error %d while accessing dataset '%s'",
error, dsname);
- return (NULL); /* not reached; luaL_error will longjmp */
+ return (0); /* not reached; luaL_error will longjmp */
}
- return (NULL);
+ return (0);
}
/*
@@ -632,10 +632,10 @@ static zcp_lib_info_t zcp_debug_info = {
.func = zcp_debug,
.pargs = {
{ .za_name = "debug string", .za_lua_type = LUA_TSTRING},
- {NULL, NULL}
+ {NULL, 0}
},
.kwargs = {
- {NULL, NULL}
+ {NULL, 0}
}
};
@@ -661,10 +661,10 @@ static zcp_lib_info_t zcp_exists_info = {
.func = zcp_exists,
.pargs = {
{ .za_name = "dataset", .za_lua_type = LUA_TSTRING},
- {NULL, NULL}
+ {NULL, 0}
},
.kwargs = {
- {NULL, NULL}
+ {NULL, 0}
}
};