diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-11-22 08:56:40 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-11-22 08:56:40 +0300 |
commit | 81ca3923a29ea9b67f7291be23b210019546aa5f (patch) | |
tree | fcebf0d426665b4f06e01168f27cd8f9ab8c50d8 /accel-pppd/shaper | |
parent | 830c399cf126f6bf1e8dfa1ad919a3ce8e346c5d (diff) | |
download | accel-ppp-81ca3923a29ea9b67f7291be23b210019546aa5f.tar.gz accel-ppp-81ca3923a29ea9b67f7291be23b210019546aa5f.zip |
remove trailing whitespaces
Diffstat (limited to 'accel-pppd/shaper')
-rw-r--r-- | accel-pppd/shaper/leaf_qdisc.c | 30 | ||||
-rw-r--r-- | accel-pppd/shaper/shaper.h | 2 |
2 files changed, 16 insertions, 16 deletions
diff --git a/accel-pppd/shaper/leaf_qdisc.c b/accel-pppd/shaper/leaf_qdisc.c index a2628e0a..d6b29583 100644 --- a/accel-pppd/shaper/leaf_qdisc.c +++ b/accel-pppd/shaper/leaf_qdisc.c @@ -30,12 +30,12 @@ static int parse_size(const char *str, int *r) if (endptr == str) return -1; - + if (*endptr == 0) { *r = sz; return 0; } - + if (strcmp(endptr, "kb") == 0 || strcmp(endptr, "k") == 0) *r = sz * 1024; else if (strcmp(endptr, "mb") == 0 || strcmp(endptr, "m") == 0) @@ -66,12 +66,12 @@ static int parse_time(const char *str, int *r) if (endptr == str) return -1; - + if (*endptr == 0) { *r = t; return 0; } - + if (strcmp(endptr, "s") == 0 || strcmp(endptr, "sec") == 0) *r = t * TIME_UNITS_PER_SEC; else if (strcmp(endptr, "ms") == 0 || strcmp(endptr, "msec") == 0) @@ -109,17 +109,17 @@ static int parse_sfq(char *str) if (!*str) goto out; - + while (1) { for (ptr1 = str + 1; *ptr1 && *ptr1 != ' '; ptr1++); if (!*ptr1) return -1; - + *ptr1 = 0; for (ptr1++; *ptr1 && *ptr1 == ' '; ptr1++); - + if (!*ptr1) return -1; @@ -160,7 +160,7 @@ static int parse_fq_codel(char *str) char *ptr1, *ptr2; conf_lq_arg6 = -1; - + if (!*str) goto out; @@ -169,11 +169,11 @@ static int parse_fq_codel(char *str) if (!*ptr1) return -1; - + *ptr1 = 0; for (ptr1++; *ptr1 && *ptr1 == ' '; ptr1++); - + if (!*ptr1) return -1; @@ -241,9 +241,9 @@ void leaf_qdisc_parse(const char *opt) #endif } else log_emerg("shaper: unknown leaf-qdisc '%s'\n", str); - + free(str); - + return; out_err: log_emerg("shaper: failed to parse '%s'\n", opt); @@ -256,7 +256,7 @@ static int qdisc_sfq(struct qdisc_opt *qopt, struct nlmsghdr *n) .perturb_period = conf_lq_arg2, .limit = conf_lq_arg3, }; - + addattr_l(n, 1024, TCA_OPTIONS, &opt, sizeof(opt)); return 0; @@ -316,12 +316,12 @@ int install_leaf_qdisc(struct rtnl_handle *rth, int ifindex, int parent, int han { if (conf_leaf_qdisc == LEAF_QDISC_SFQ) return install_sfq(rth, ifindex, parent, handle); - + #ifdef TCA_FQ_CODEL_MAX else if (conf_leaf_qdisc == LEAF_QDISC_FQ_CODEL) return install_fq_codel(rth, ifindex, parent, handle); #endif - + return 0; } diff --git a/accel-pppd/shaper/shaper.h b/accel-pppd/shaper/shaper.h index 4864b86f..87cf45fe 100644 --- a/accel-pppd/shaper/shaper.h +++ b/accel-pppd/shaper/shaper.h @@ -21,7 +21,7 @@ struct qdisc_opt { int quantum; int defcls; int (*qdisc)(struct qdisc_opt *opt, struct nlmsghdr *n); -}; +}; extern int conf_up_limiter; extern int conf_down_limiter; |