static void lxc_setup_fs(void);
static int do_start(void *arg);
-static struct my_iflist *tmpif, *my_iflist = NULL;
+static struct my_iflist *tmpif, *my_iflist;
static const struct option my_longopts[] = {
{"namespaces", required_argument, 0, 's'},
args->want_hostname = arg;
break;
case 'i':
- if (!(tmpif = malloc(sizeof(*tmpif)))) {
+ tmpif = malloc(sizeof(*tmpif));
+ if (!tmpif) {
SYSERROR("Failed to malloc()");
return -1;
}
exit(EXIT_FAILURE);
}
- if (*my_args.argv == NULL) {
+ if (!*my_args.argv) {
ERROR("A command to execute in the new namespace is required");
exit(EXIT_FAILURE);
}
/* Call exit() directly on this function because it retuns an exit code. */
exit(EXIT_SUCCESS);
-}
\ No newline at end of file
+}