netdev
[Top] [All Lists]

Re: [PATCH PKT_SCHED 11/17]: Remove checks for impossible conditions in

To: Patrick McHardy <kaber@xxxxxxxxx>
Subject: Re: [PATCH PKT_SCHED 11/17]: Remove checks for impossible conditions in ipt action
From: Thomas Graf <tgraf@xxxxxxx>
Date: Thu, 30 Dec 2004 14:40:29 +0100
Cc: jamal <hadi@xxxxxxxxxx>, Maillist netdev <netdev@xxxxxxxxxxx>
In-reply-to: <41D378AB.70204@trash.net>
References: <41D378AB.70204@trash.net>
Sender: netdev-bounce@xxxxxxxxxxx
* Patrick McHardy <41D378AB.70204@xxxxxxxxx> 2004-12-30 04:40
> -     if (a == NULL || rta == NULL ||
> -         rtattr_parse(tb, TCA_IPT_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)) < 0)
> +     if (rtattr_parse(tb, TCA_IPT_MAX, RTA_DATA(rta), RTA_PAYLOAD(rta)) < 0)
>               return -1;

You might want to use rtattr_parse_nested here (see patch 1 of my latest
patchset)

if (rtattr_parse_nested(tb, TCA_IPT_MAX, rta) < 0)

Purely cosmetic though. It gives a slightly better hint on what is being
done.

<Prev in Thread] Current Thread [Next in Thread>