]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Use parse_rtattr_nested
author5!tgraf <5!tgraf>
Tue, 18 Jan 2005 22:11:58 +0000 (22:11 +0000)
committer5!tgraf <5!tgraf>
Tue, 18 Jan 2005 22:11:58 +0000 (22:11 +0000)
(Logical change 1.129)

tc/f_fw.c
tc/q_cbq.c

index b8134be4f170aeeaff245bb991d1a441fd904422..5a56098623fd0895eb0b2d456af1a11e6f083fb2 100644 (file)
--- 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);
index 3a10175d615febc9a365b8ecb11a0b274d3a8da8..40c02284e5838f194d29c134579ee5811cdb84f0 100644 (file)
@@ -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))