]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
start: lxc_init_handler()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 18 Feb 2018 23:01:43 +0000 (00:01 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 21 Feb 2018 16:59:42 +0000 (17:59 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/start.c

index 7ca376422e8a1436b4f2c29176c6d0b6dd023a54..386a4a2d6ca637cd5fe6883c1db798a1935c5726 100644 (file)
@@ -657,16 +657,13 @@ struct lxc_handler *lxc_init_handler(const char *name, struct lxc_conf *conf,
        struct lxc_handler *handler;
 
        handler = malloc(sizeof(*handler));
-       if (!handler) {
-               ERROR("failed to allocate memory");
+       if (!handler)
                return NULL;
-       }
-
        memset(handler, 0, sizeof(*handler));
 
-       /* Note that am_guest_unpriv() checks the effective uid. We probably don't
-        * care if we are real root only if we are running as root so this
-        * should be fine.
+       /* Note that am_guest_unpriv() checks the effective uid. We
+        * probably don't care if we are real root only if we are running
+        * as root so this should be fine.
         */
        handler->am_root = !am_guest_unpriv();
        handler->data_sock[0] = handler->data_sock[1] = -1;
@@ -685,8 +682,8 @@ struct lxc_handler *lxc_init_handler(const char *name, struct lxc_conf *conf,
 
        if (daemonize && !handler->conf->reboot) {
                /* Create socketpair() to synchronize on daemonized startup.
-                * When the container reboots we don't need to synchronize again
-                * currently so don't open another socketpair().
+                * When the container reboots we don't need to synchronize
+                * again currently so don't open another socketpair().
                 */
                ret = socketpair(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0,
                                 handler->state_socket_pair);