From: Tobin C. Harding Date: Mon, 20 Aug 2018 23:44:36 +0000 (+1000) Subject: cmd: Fix format issues found by clang-format X-Git-Tag: lxc-3.1.0~142^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ec1c4845378cce7184072be9bbc072606e861ca;p=thirdparty%2Flxc.git cmd: Fix format issues found by clang-format clang-format finds a few format issues, lets fix these up. Fix format issues found by clang-format. Signed-off-by: Tobin C. Harding --- diff --git a/src/lxc/cmd/lxc_init.c b/src/lxc/cmd/lxc_init.c index 75900a9d3..7595989a7 100644 --- a/src/lxc/cmd/lxc_init.c +++ b/src/lxc/cmd/lxc_init.c @@ -22,6 +22,7 @@ */ #define _GNU_SOURCE +#include #include #include #include @@ -30,11 +31,10 @@ #include #include #include -#include #include #include #include -#include +#include #include #include diff --git a/src/lxc/cmd/lxc_monitord.c b/src/lxc/cmd/lxc_monitord.c index e6cb77338..fe0ba7f35 100644 --- a/src/lxc/cmd/lxc_monitord.c +++ b/src/lxc/cmd/lxc_monitord.c @@ -24,21 +24,21 @@ #define _GNU_SOURCE #include #include +#include +#include #include +#include #include #include #include #include -#include -#include -#include -#include #include #include #include #include #include #include +#include #include diff --git a/src/lxc/cmd/lxc_user_nic.c b/src/lxc/cmd/lxc_user_nic.c index 153940b86..2d16904d0 100644 --- a/src/lxc/cmd/lxc_user_nic.c +++ b/src/lxc/cmd/lxc_user_nic.c @@ -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); }