Commit 14ee9e61 authored by 6!tgraf's avatar 6!tgraf

Use parse_rtattr_nested

(Logical change 1.129)
parent 87bc1f03
...@@ -318,8 +318,7 @@ print_police(struct action_util *a, FILE *f, struct rtattr *arg) ...@@ -318,8 +318,7 @@ print_police(struct action_util *a, FILE *f, struct rtattr *arg)
if (arg == NULL) if (arg == NULL)
return 0; return 0;
memset(tb, 0, sizeof(tb)); parse_rtattr_nested(tb, TCA_POLICE_MAX, arg);
parse_rtattr(tb, TCA_POLICE_MAX, RTA_DATA(arg), RTA_PAYLOAD(arg));
if (tb[TCA_POLICE_TBF] == NULL) { if (tb[TCA_POLICE_TBF] == NULL) {
fprintf(f, "[NULL police tbf]"); fprintf(f, "[NULL police tbf]");
......
...@@ -246,8 +246,7 @@ static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) ...@@ -246,8 +246,7 @@ static int htb_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
if (opt == NULL) if (opt == NULL)
return 0; return 0;
memset(tb, 0, sizeof(tb)); parse_rtattr_nested(tb, TCA_HTB_RTAB, opt);
parse_rtattr(tb, TCA_HTB_RTAB, RTA_DATA(opt), RTA_PAYLOAD(opt));
if (tb[TCA_HTB_PARMS]) { if (tb[TCA_HTB_PARMS]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment