]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
scrub out whitespace issues
authorStephen Hemminger <stephen@networkplumber.org>
Sun, 27 Mar 2016 17:47:46 +0000 (10:47 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 27 Mar 2016 17:50:14 +0000 (10:50 -0700)
Run script that removes trailing whitespace everywhere.

17 files changed:
bridge/fdb.c
bridge/monitor.c
genl/ctrl.c
include/libnetlink.h
lib/coverity_model.c
lib/dnet_ntop.c
lib/inet_proto.c
lib/ipx_ntop.c
lib/libgenl.c
lib/libnetlink.c
lib/utils.c
netem/maketable.c
netem/normal.c
netem/pareto.c
netem/paretonormal.c
tc/m_action.c
tc/tc_core.c

index e8c314a3c0771568f1ac22b5c3a95ee6c716e648..df55e86df83fa4e6aa112f37ff60c84c3ad5120d 100644 (file)
@@ -298,7 +298,7 @@ static int fdb_modify(int cmd, int flags, int argc, char **argv)
                        req.ndm.ndm_flags |= NTF_MASTER;
                } else if (matches(*argv, "router") == 0) {
                        req.ndm.ndm_flags |= NTF_ROUTER;
-               } else if (matches(*argv, "local") == 0 || 
+               } else if (matches(*argv, "local") == 0 ||
                           matches(*argv, "permanent") == 0) {
                        req.ndm.ndm_state |= NUD_PERMANENT;
                } else if (matches(*argv, "temp") == 0 ||
index 62690810de1f11c160284a5e90a622c1468fbb22..d294269e1092fad077e59a5abcbd38b64e027cde 100644 (file)
@@ -142,4 +142,3 @@ int do_monitor(int argc, char **argv)
 
        return 0;
 }
-
index b7a8878c8eb7ead7fd7488abc3094a2f9be2f2f0..ffa34af56b246eee7129ab5a5d707c91a809377c 100644 (file)
@@ -132,7 +132,7 @@ static void print_ctrl_cmd_flags(FILE *fp, __u32 fl)
 
        fprintf(fp, "\n");
 }
-       
+
 static int print_ctrl_cmds(FILE *fp, struct rtattr *arg, __u32 ctrl_ver)
 {
        struct rtattr *tb[CTRL_ATTR_OP_MAX + 1];
index 431189e20d48e50ef9d65463cc8bd9a14c04699d..491263f7e1039fc82ca1dc2986703d988e1030f8 100644 (file)
@@ -11,8 +11,7 @@
 #include <linux/neighbour.h>
 #include <linux/netconf.h>
 
-struct rtnl_handle
-{
+struct rtnl_handle {
        int                     fd;
        struct sockaddr_nl      local;
        struct sockaddr_nl      peer;
@@ -26,10 +25,10 @@ struct rtnl_handle
 
 extern int rcvbuf;
 
-int rtnl_open(struct rtnl_handle *rth, unsigned subscriptions)
+int rtnl_open(struct rtnl_handle *rth, unsigned int subscriptions)
        __attribute__((warn_unused_result));
 
-int rtnl_open_byproto(struct rtnl_handle *rth, unsigned subscriptions,
+int rtnl_open_byproto(struct rtnl_handle *rth, unsigned int subscriptions,
                             int protocol)
        __attribute__((warn_unused_result));
 
@@ -56,8 +55,7 @@ typedef int (*rtnl_listen_filter_t)(const struct sockaddr_nl *,
                                    struct rtnl_ctrl_data *,
                                    struct nlmsghdr *n, void *);
 
-struct rtnl_dump_filter_arg
-{
+struct rtnl_dump_filter_arg {
        rtnl_filter_t filter;
        void *arg1;
        __u16 nc_flags;
@@ -140,6 +138,7 @@ static inline __u32 rta_getattr_u32(const struct rtattr *rta)
 static inline __u64 rta_getattr_u64(const struct rtattr *rta)
 {
        __u64 tmp;
+
        memcpy(&tmp, RTA_DATA(rta), sizeof(__u64));
        return tmp;
 }
@@ -159,42 +158,42 @@ int rtnl_from_file(FILE *, rtnl_listen_filter_t handler,
 
 #ifndef IFA_RTA
 #define IFA_RTA(r) \
-       ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
+       ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
 #endif
 #ifndef IFA_PAYLOAD
-#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
+#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ifaddrmsg))
 #endif
 
 #ifndef IFLA_RTA
 #define IFLA_RTA(r) \
-       ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
+       ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
 #endif
 #ifndef IFLA_PAYLOAD
-#define IFLA_PAYLOAD(n)        NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
+#define IFLA_PAYLOAD(n)        NLMSG_PAYLOAD(n, sizeof(struct ifinfomsg))
 #endif
 
 #ifndef NDA_RTA
 #define NDA_RTA(r) \
-       ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
+       ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
 #endif
 #ifndef NDA_PAYLOAD
-#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg))
+#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ndmsg))
 #endif
 
 #ifndef NDTA_RTA
 #define NDTA_RTA(r) \
-       ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg))))
+       ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg))))
 #endif
 #ifndef NDTA_PAYLOAD
-#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
+#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n, sizeof(struct ndtmsg))
 #endif
 
 #ifndef NETNS_RTA
 #define NETNS_RTA(r) \
-       ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct rtgenmsg))))
+       ((struct rtattr *)(((char *)(r)) + NLMSG_ALIGN(sizeof(struct rtgenmsg))))
 #endif
 #ifndef NETNS_PAYLOAD
-#define NETNS_PAYLOAD(n)       NLMSG_PAYLOAD(n,sizeof(struct rtgenmsg))
+#define NETNS_PAYLOAD(n)       NLMSG_PAYLOAD(n, sizeof(struct rtgenmsg))
 #endif
 
 /* User defined nlmsg_type which is used mostly for logging netlink
@@ -202,4 +201,3 @@ int rtnl_from_file(FILE *, rtnl_listen_filter_t handler,
 #define NLMSG_TSTAMP   15
 
 #endif /* __LIBNETLINK_H__ */
-
index c89630206f8908951110ec54f06b953291a4385a..1321fe82262c347321e7bae116c803ddebf5befb 100644 (file)
@@ -15,5 +15,3 @@
  * Coverity Scan doesn't pick up modifications automatically. The model file
  * must be uploaded by an admin.
  */
-
-
index 507a7eb8e5f68896083286eb057894bc60899fc3..112dc0d90591077e9b0bc02c561a3f89ba5d3d19 100644 (file)
@@ -98,5 +98,3 @@ const char *dnet_ntop(int af, const void *addr, char *str, size_t len)
 
        return NULL;
 }
-
-
index 57a83511340a8f37e100f9c5aad59d9fae78c364..ceda082b12a2ed256462be56a1732c192040146a 100644 (file)
@@ -67,5 +67,3 @@ int inet_proto_a2n(const char *buf)
        }
        return -1;
 }
-
-
index 1e46bc219051af80a8a3e7518c101899334bcaef..5f646b3e0ec40a50b57fbcffe82d322a5a7040bd 100644 (file)
@@ -68,5 +68,3 @@ const char *ipx_ntop(int af, const void *addr, char *str, size_t len)
 
        return NULL;
 }
-
-
index acb1478389476105ab8bddb83a6ff887d01fdff1..a1a37a440f64f2418fed9dce537b7629869553a0 100644 (file)
@@ -60,4 +60,3 @@ int genl_resolve_family(struct rtnl_handle *grth, const char *family)
 
        return genl_parse_getfamily(&req.n);
 }
-
index 245c4ca216753d343e4b5cafa7a7d9d7f4f3463b..a90e52ca2c0aa00d89dc570c0759e216cca2f671 100644 (file)
@@ -158,7 +158,7 @@ int rtnl_send_check(struct rtnl_handle *rth, const void *buf, int len)
                        struct nlmsgerr *err = (struct nlmsgerr*)NLMSG_DATA(h);
                        if (h->nlmsg_len < NLMSG_LENGTH(sizeof(struct nlmsgerr)))
                                fprintf(stderr, "ERROR truncated\n");
-                       else 
+                       else
                                errno = -err->error;
                        return -1;
                }
index bd5842730147faa2638b7efa6b7f23a40571cf7b..b93b1dc843150154bb234790b154863ed12e41ac 100644 (file)
@@ -95,7 +95,7 @@ static int get_netmask(unsigned *val, const char *arg, int base)
        /* try coverting dotted quad to CIDR */
        if (!get_addr_1(&addr, arg, AF_INET) && addr.family == AF_INET) {
                int b = mask2bits(addr.data[0]);
-               
+
                if (b >= 0) {
                        *val = b;
                        return 0;
@@ -191,7 +191,7 @@ int get_time_rtt(unsigned *val, const char *arg, int *raw)
        *val = t;
        if (*val < t)
                *val += 1;
-       
+
         return 0;
 
 }
@@ -363,7 +363,7 @@ static int get_addr_ipv4(__u8 *ap, const char *cp)
        for (i = 0; i < 4; i++) {
                unsigned long n;
                char *endp;
-               
+
                n = strtoul(cp, &endp, 0);
                if (n > 255)
                        return -1;      /* bogus network value */
index a5452b61730c100b48835d409dbee93b033ae917..dc505328579281b0eeb1dd956097b4aecbaa4b0b 100644 (file)
@@ -210,7 +210,7 @@ main(int argc, char **argv)
                }
        } else {
                fp = stdin;
-       }                               
+       }
        x = readdoubles(fp, &limit);
        if (limit <= 0) {
                fprintf(stderr, "Nothing much read!\n");
@@ -221,7 +221,7 @@ main(int argc, char **argv)
        fprintf(stderr, "%d values, mu %10.4f, sigma %10.4f, rho %10.4f\n",
                limit, mu, sigma, rho);
 #endif
-       
+
        table = makedist(x, limit, mu, sigma);
        free((void *) x);
        cumulativedist(table, DISTTABLESIZE, &total);
index dbdebb1d08e312a6d3c3ad7af22eefb4894870c3..90963f4e91a4a2c4fb1a7b5fa4198370252be4cb 100644 (file)
@@ -33,7 +33,7 @@ main(int argc, char **argv)
                table[i] = x;
        }
 
-       
+
        printf("# This is the distribution table for the normal distribution.\n");
        for (i = n = 0; i < TABLESIZE; i += 4) {
                int value = (int) rint(table[i]*TABLEFACTOR);
index 8aa647b62cd0bcff9545b3f9215a21685bbad142..51d9437dbcb2ab8db3bf89670bae3532745a49b2 100644 (file)
@@ -36,6 +36,6 @@ main(int argc, char **argv)
                        n = 0;
                }
        }
-       
+
        return 0;
-}      
+}
index ed75f288302ba82f180e264cff207799933563c0..83ec87d4dbdaadb94e5aea2c6c5d228ab25f5699 100644 (file)
@@ -44,7 +44,7 @@ paretovalue(int i)
        if (dvalue > 32767)
                dvalue = 32767;
        return (int)rint(dvalue);
-}      
+}
 
 int
 main(int argc, char **argv)
index 5c47c82520c1ae55151c92b36a2f8199243c71de..c416d98a775a645218829fb62df36bd2deb8cf69 100644 (file)
@@ -141,9 +141,9 @@ static int
 new_cmd(char **argv)
 {
        if ((matches(*argv, "change") == 0) ||
-               (matches(*argv, "replace") == 0) || 
-               (matches(*argv, "delete") == 0) || 
-               (matches(*argv, "get") == 0) || 
+               (matches(*argv, "replace") == 0) ||
+               (matches(*argv, "delete") == 0) ||
+               (matches(*argv, "get") == 0) ||
                (matches(*argv, "add") == 0))
                        return 1;
 
index 194028ae09e2859c73c9f4c96758f84f7af138be..7bbe0d733fc759d03ce29dca890ab999498e6fd9 100644 (file)
@@ -145,7 +145,7 @@ int tc_calc_rtable(struct tc_ratespec *r, __u32 *rtab,
                rtab[i] = tc_calc_xmittime(bps, sz);
        }
 
-       r->cell_align =  -1; 
+       r->cell_align =  -1;
        r->cell_log = cell_log;
        r->linklayer = (linklayer & TC_LINKLAYER_MASK);
        return cell_log;