Unverified Commit 3cd86139 by Rikard Falkeborn Committed by Christian Brauner

zfs: Fix return value on zfs_snapshot error

Returning -1 in a function with return type bool is the same as returning true. Change to return false to indicate error properly. Detected with cppcheck. Signed-off-by: 's avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
parent c5e6088f
......@@ -427,7 +427,7 @@ bool zfs_snapshot(struct lxc_conf *conf, struct lxc_storage *orig,
if (ret < 0 || ret >= PATH_MAX) {
ERROR("Failed to create string");
free(snapshot);
return -1;
return false;
}
cmd_args.dataset = lxc_storage_get_path(new->src, new->type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment