Commit 35bfea7a by 2xsec

tools: lxc-unshare: fix wrong coding rules

Signed-off-by: 's avatar2xsec <dh48.jeong@samsung.com>
parent 727b9b16
...@@ -338,4 +338,4 @@ bool lxc_setup_shared_ns(struct lxc_arguments *args, struct lxc_container *c) ...@@ -338,4 +338,4 @@ bool lxc_setup_shared_ns(struct lxc_arguments *args, struct lxc_container *c)
} }
return true; return true;
} }
\ No newline at end of file
...@@ -71,7 +71,7 @@ static int mount_fs(const char *source, const char *target, const char *type); ...@@ -71,7 +71,7 @@ static int mount_fs(const char *source, const char *target, const char *type);
static void lxc_setup_fs(void); static void lxc_setup_fs(void);
static int do_start(void *arg); 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[] = { static const struct option my_longopts[] = {
{"namespaces", required_argument, 0, 's'}, {"namespaces", required_argument, 0, 's'},
...@@ -128,7 +128,8 @@ static int my_parser(struct lxc_arguments *args, int c, char *arg) ...@@ -128,7 +128,8 @@ static int my_parser(struct lxc_arguments *args, int c, char *arg)
args->want_hostname = arg; args->want_hostname = arg;
break; break;
case 'i': case 'i':
if (!(tmpif = malloc(sizeof(*tmpif)))) { tmpif = malloc(sizeof(*tmpif));
if (!tmpif) {
SYSERROR("Failed to malloc()"); SYSERROR("Failed to malloc()");
return -1; return -1;
} }
...@@ -327,7 +328,7 @@ int main(int argc, char *argv[]) ...@@ -327,7 +328,7 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (*my_args.argv == NULL) { if (!*my_args.argv) {
ERROR("A command to execute in the new namespace is required"); ERROR("A command to execute in the new namespace is required");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
...@@ -443,4 +444,4 @@ int main(int argc, char *argv[]) ...@@ -443,4 +444,4 @@ int main(int argc, char *argv[])
/* Call exit() directly on this function because it retuns an exit code. */ /* Call exit() directly on this function because it retuns an exit code. */
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} }
\ No newline at end of file
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