Merge pull request #2555 from tcharding/clang-format-cmd

cmd: Fix format issues found by clang-format
This commit is contained in:
Christian Brauner 2018-08-21 11:25:34 +02:00 committed by GitHub
commit 501751d09a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 15 deletions

View File

@ -22,6 +22,7 @@
*/
#define _GNU_SOURCE
#include <ctype.h>
#include <errno.h>
#include <getopt.h>
#include <libgen.h>
@ -30,11 +31,10 @@
#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>

View File

@ -24,21 +24,21 @@
#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>

View 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;
}
@ -1006,7 +1006,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);
}