lxc_error("Failed to retrieve ipc namespace for container \"%s\"\n", name);
goto out;
}
- ns_buf[ret == 0 ? ret : ret - 1] = '\0';
+ ns_buf[ret] = '\0';
if (strcmp(args->inherited_ipc_ns, ns_buf) != 0) {
lxc_error("Failed to inherit ipc namespace from container \"owning-ns\": %s != %s\n", args->inherited_ipc_ns, ns_buf);
lxc_error("Failed to retrieve ipc namespace for container \"%s\"\n", name);
goto out;
}
- ns_buf[ret == 0 ? ret : ret - 1] = '\0';
+ ns_buf[ret] = '\0';
if (strcmp(args->inherited_net_ns, ns_buf) != 0) {
lxc_error("Failed to inherit net namespace from container \"owning-ns\": %s != %s\n", args->inherited_net_ns, ns_buf);