]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cmd: Fix whitespace ERRORS
authorTobin C. Harding <me@tobin.cc>
Thu, 16 Aug 2018 07:01:30 +0000 (17:01 +1000)
committerTobin C. Harding <me@tobin.cc>
Thu, 16 Aug 2018 07:01:30 +0000 (17:01 +1000)
checkpatch.pl emits a bunch of warnings about various whitespace
issues.  Fix all these as a single patch since they are all whitespace
only changes.

Fix whitespace issues found by checkpatch.pl

Signed-off-by: Tobin C. Harding <me@tobin.cc>
src/lxc/cmd/lxc_init.c
src/lxc/cmd/lxc_monitord.c
src/lxc/cmd/lxc_usernsexec.c

index b800389d3a612d63a963089a0c9307411c335c54..7f47cbddb27f9050152127142e879145a1e77a47 100644 (file)
@@ -336,7 +336,7 @@ int main(int argc, char *argv[])
                        sigerr = signal(i, SIG_DFL);
                        if (sigerr == SIG_ERR) {
                                SYSDEBUG("Failed to reset to default action "
-                                        "for signal \"%d\": %d", i, pid);
+                                        "for signal \"%d\": %d", i, pid);
                        }
                }
 
@@ -350,8 +350,8 @@ int main(int argc, char *argv[])
                if (sid < 0)
                        DEBUG("Failed to make child session leader");
 
-                if (ioctl(STDIN_FILENO, TIOCSCTTY, 0) < 0)
-                        DEBUG("Failed to set controlling terminal");
+               if (ioctl(STDIN_FILENO, TIOCSCTTY, 0) < 0)
+                       DEBUG("Failed to set controlling terminal");
 
                NOTICE("Exec'ing \"%s\"", my_args.argv[0]);
 
@@ -556,7 +556,7 @@ static int arguments_parse(struct arguments *args, int argc,
 
        /* Check the command options */
        if (!args->name) {
-               if(!args->quiet)
+               if (!args->quiet)
                        fprintf(stderr, "lxc-init: missing container name, use --name option\n");
                return -1;
        }
index 77be14defc5a49264adcb09b7b179901819014df..0b9d7fd013d5e9d77efb14a6987b61f0d09b5456 100644 (file)
@@ -130,7 +130,8 @@ static int lxc_monitord_fifo_delete(struct lxc_monitor *mon)
        return 0;
 }
 
-static void lxc_monitord_sockfd_remove(struct lxc_monitor *mon, int fd) {
+static void lxc_monitord_sockfd_remove(struct lxc_monitor *mon, int fd)
+{
        int i;
 
        if (lxc_mainloop_del_handler(&mon->descr, fd))
@@ -175,7 +176,7 @@ static int lxc_monitord_sock_handler(int fd, uint32_t events, void *data,
 static int lxc_monitord_sock_accept(int fd, uint32_t events, void *data,
                                    struct lxc_epoll_descr *descr)
 {
-       int ret,clientfd;
+       int ret, clientfd;
        struct lxc_monitor *mon = data;
        struct ucred cred;
        socklen_t credsz = sizeof(cred);
@@ -301,7 +302,7 @@ static void lxc_monitord_delete(struct lxc_monitor *mon)
 static int lxc_monitord_fifo_handler(int fd, uint32_t events, void *data,
                                     struct lxc_epoll_descr *descr)
 {
-       int ret,i;
+       int ret, i;
        struct lxc_msg msglxc;
        struct lxc_monitor *mon = data;
 
@@ -315,7 +316,7 @@ static int lxc_monitord_fifo_handler(int fd, uint32_t events, void *data,
                ret = lxc_write_nointr(mon->clientfds[i], &msglxc, sizeof(msglxc));
                if (ret < 0)
                        SYSERROR("Failed to send message to client file descriptor %d",
-                                mon->clientfds[i]);
+                                mon->clientfds[i]);
        }
 
        return LXC_MAINLOOP_CONTINUE;
@@ -371,7 +372,7 @@ int main(int argc, char *argv[])
        }
 
        ret = snprintf(logpath, sizeof(logpath), "%s/lxc-monitord.log",
-                      (strcmp(LXCPATH, lxcpath) ? lxcpath : LOGPATH ));
+                      (strcmp(LXCPATH, lxcpath) ? lxcpath : LOGPATH));
        if (ret < 0 || ret >= sizeof(logpath))
                exit(EXIT_FAILURE);
 
index 07e6c9e416655af1dadd3adca78ba23838bdf9fc..268ec9341f3aa2c7f37fad450d3672ddf206c3dd 100644 (file)
@@ -394,7 +394,7 @@ int main(int argc, char *argv[])
 
                close(pipe_fds1[1]);
                close(pipe_fds2[0]);
-               return do_child((void*)argv);
+               return do_child((void *)argv);
        }
 
        close(pipe_fds1[1]);