summaryrefslogtreecommitdiffstats
path: root/tc
diff options
context:
space:
mode:
author5!tgraf <5!tgraf>2005-01-18 22:11:58 +0000
committer5!tgraf <5!tgraf>2005-01-18 22:11:58 +0000
commit021ed13fdceaa41de91af64825b7ca3e98f00a5e (patch)
tree83e6e2fbc5d320ae16c2ba16c73fd6af235740c9 /tc
parent3b3ecd31c1e513f029ebbb83f2e808553de0a741 (diff)
Use parse_rtattr_nested
(Logical change 1.129)
Diffstat (limited to 'tc')
-rw-r--r--tc/f_fw.c4
-rw-r--r--tc/q_cbq.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/tc/f_fw.c b/tc/f_fw.c
index b8134be4..5a560986 100644
--- a/tc/f_fw.c
+++ b/tc/f_fw.c
@@ -109,9 +109,7 @@ static int fw_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt, __u
if (opt == NULL)
return 0;
- memset(tb, 0, sizeof(tb));
- if (opt)
- parse_rtattr(tb, TCA_FW_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt));
+ parse_rtattr_nested(tb, TCA_FW_MAX, opt);
if (handle)
fprintf(f, "handle 0x%x ", handle);
diff --git a/tc/q_cbq.c b/tc/q_cbq.c
index 3a10175d..40c02284 100644
--- a/tc/q_cbq.c
+++ b/tc/q_cbq.c
@@ -422,8 +422,7 @@ static int cbq_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if (opt == NULL)
return 0;
- memset(tb, 0, sizeof(tb));
- parse_rtattr(tb, TCA_CBQ_MAX, RTA_DATA(opt), RTA_PAYLOAD(opt));
+ parse_rtattr_nested(tb, TCA_CBQ_MAX, opt);
if (tb[TCA_CBQ_RATE]) {
if (RTA_PAYLOAD(tb[TCA_CBQ_RATE]) < sizeof(*r))