]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ipvrf: cleanup style issues
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 13 Dec 2016 18:43:24 +0000 (10:43 -0800)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 13 Dec 2016 18:43:24 +0000 (10:43 -0800)
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/ipvrf.c

index d49af774438e23c3831b44b0e203bf4c0bfc4d11..4d59845416cdc341693f65c7a6001b4ba2ef9f10 100644 (file)
@@ -117,7 +117,8 @@ static int ipvrf_pids(int argc, char **argv)
                n = read(fd, buf, sizeof(buf) - 1);
                if (n < 0) {
                        fprintf(stderr,
-                               "Failed to read cgroups file: %s\n", strerror(errno));
+                               "Failed to read cgroups file: %s\n",
+                               strerror(errno));
                        break;
                } else if (n == 0) {
                        rc = 0;
@@ -139,8 +140,10 @@ static int prog_load(int idx)
        struct bpf_insn prog[] = {
                BPF_MOV64_REG(BPF_REG_6, BPF_REG_1),
                BPF_MOV64_IMM(BPF_REG_3, idx),
-               BPF_MOV64_IMM(BPF_REG_2, offsetof(struct bpf_sock, bound_dev_if)),
-               BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3, offsetof(struct bpf_sock, bound_dev_if)),
+               BPF_MOV64_IMM(BPF_REG_2,
+                             offsetof(struct bpf_sock, bound_dev_if)),
+               BPF_STX_MEM(BPF_W, BPF_REG_1, BPF_REG_3,
+                           offsetof(struct bpf_sock, bound_dev_if)),
                BPF_MOV64_IMM(BPF_REG_0, 1), /* r0 = verdict */
                BPF_EXIT_INSN(),
        };
@@ -155,7 +158,9 @@ static int vrf_configure_cgroup(const char *path, int ifindex)
 
        cg_fd = open(path, O_DIRECTORY | O_RDONLY);
        if (cg_fd < 0) {
-               fprintf(stderr, "Failed to open cgroup path: '%s'\n", strerror(errno));
+               fprintf(stderr,
+                       "Failed to open cgroup path: '%s'\n",
+                       strerror(errno));
                goto out;
        }
 
@@ -172,7 +177,7 @@ static int vrf_configure_cgroup(const char *path, int ifindex)
        if (bpf_prog_attach_fd(prog_fd, cg_fd, BPF_CGROUP_INET_SOCK_CREATE)) {
                fprintf(stderr, "Failed to attach prog to cgroup: '%s'\n",
                        strerror(errno));
-                       fprintf(stderr, "Kernel compiled with CGROUP_BPF enabled?\n");
+               fprintf(stderr, "Kernel compiled with CGROUP_BPF enabled?\n");
                goto out;
        }