]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cmd: Fix format issues found by clang-format 2555/head
authorTobin C. Harding <me@tobin.cc>
Mon, 20 Aug 2018 23:44:36 +0000 (09:44 +1000)
committerTobin C. Harding <me@tobin.cc>
Mon, 20 Aug 2018 23:56:26 +0000 (09:56 +1000)
clang-format finds a few format issues, lets fix these up.

Fix format issues found by clang-format.

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_user_nic.c

index 75900a9d3391b16ec4d26a8cdd1d839e9796c99e..7595989a70fe13e89e2cbb58dec9bbc38608c909 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #define _GNU_SOURCE
+#include <ctype.h>
 #include <errno.h>
 #include <getopt.h>
 #include <libgen.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <ctype.h>
+#include <unistd.h>
 
 #include <lxc/lxccontainer.h>
 #include <lxc/version.h>
index e6cb77338c9e6a6f741a1665874bb2f040006ceb..fe0ba7f3565c2ab61b966f5e6217197f46209f02 100644 (file)
 #define _GNU_SOURCE
 #include <errno.h>
 #include <fcntl.h>
+#include <net/if.h>
+#include <netinet/in.h>
 #include <pthread.h>
+#include <setjmp.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <setjmp.h>
 #include <sys/epoll.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/un.h>
+#include <unistd.h>
 
 #include <lxc/lxccontainer.h>
 
index 153940b86b93619af9a26827d538e57cf9cd3f60..2d16904d09e4188a87b08a8f1e59474e45bc6044 100644 (file)
@@ -555,14 +555,14 @@ static int create_nic(char *nic, char *br, int pid, char **cnic)
                        ret = lxc_netdev_set_mtu(veth1buf, mtu);
                        if (ret < 0) {
                                usernic_error("Failed to set mtu to %d on %s\n",
-                                             mtu, veth1buf);
+                                             mtu, veth1buf);
                                goto out_del;
                        }
 
                        ret = lxc_netdev_set_mtu(veth2buf, mtu);
                        if (ret < 0) {
                                usernic_error("Failed to set mtu to %d on %s\n",
-                                             mtu, veth2buf);
+                                             mtu, veth2buf);
                                goto out_del;
                        }
                }
@@ -579,7 +579,7 @@ static int create_nic(char *nic, char *br, int pid, char **cnic)
        ret = lxc_netdev_move_by_name(veth2buf, pid, NULL);
        if (ret < 0) {
                usernic_error("Error moving %s to network namespace of %d\n",
-                             veth2buf, pid);
+                             veth2buf, pid);
                goto out_del;
        }
 
@@ -1005,7 +1005,7 @@ static bool may_access_netns(int pid)
 
        ret = access(s, R_OK);
        may_access = true;
-       if (ret < 0)  {
+       if (ret < 0) {
                may_access = false;
                CMD_SYSERROR("Uid %d may not access %s\n", (int)ruid, s);
        }
@@ -1232,7 +1232,7 @@ int main(int argc, char *argv[])
                close(netns_fd);
                if (!has_priv) {
                        usernic_error("%s", "Process is not privileged over "
-                                     "network namespace\n");
+                                     "network namespace\n");
                        _exit(EXIT_FAILURE);
                }
        }
@@ -1247,7 +1247,7 @@ int main(int argc, char *argv[])
 
                if (!is_ovs_bridge(args.link)) {
                        usernic_error("%s", "Deletion of non ovs type network "
-                                     "devices not implemented\n");
+                                     "devices not implemented\n");
                        close(fd);
                        free_alloted(&alloted);
                        _exit(EXIT_FAILURE);
@@ -1267,15 +1267,15 @@ int main(int argc, char *argv[])
 
                if (!found_nicname) {
                        usernic_error("Caller is not allowed to delete network "
-                                     "device \"%s\"\n", args.veth_name);
+                                     "device \"%s\"\n", args.veth_name);
                        _exit(EXIT_FAILURE);
                }
 
                ret = lxc_ovs_delete_port(args.link, args.veth_name);
                if (ret < 0) {
                        usernic_error("Failed to remove port \"%s\" from "
-                                     "openvswitch bridge \"%s\"",
-                                     args.veth_name, args.link);
+                                     "openvswitch bridge \"%s\"",
+                                     args.veth_name, args.link);
                        _exit(EXIT_FAILURE);
                }