}
interface->if_name = strdup(if_name);
+
assert(interface->if_name);
// Connect one end of the the veth pair to the namespace's interface
assert(sprintf(cmd, "ip link set %s netns %s name %s", eth_pairs[i], ns[i]->name, interface->if_name) >= 0);
+
assert(system(cmd) == 0);
} else {
for(i = 0; i < namespace_handle->pid_nos; i++) {
pid = (namespace_handle->pids)[i];
- assert(kill(pid, SIGINT) != -1);
+ kill(pid, SIGINT);
pid_ret = waitpid(pid, NULL, WNOHANG);
assert(pid_ret != -1);