| To: | Thomas Graf <tgraf@xxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] PKT_SCHED: remove c99ism |
| From: | Andrew Morton <akpm@xxxxxxxx> |
| Date: | Sat, 15 Jan 2005 15:32:02 -0800 |
| Cc: | davem@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <20050115232554.GS26856@xxxxxxxxxxxxxx> |
| References: | <20050115144010.33182075.akpm@xxxxxxxx> <20050115232554.GS26856@xxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
Thomas Graf <tgraf@xxxxxxx> wrote:
>
> #ifdef CONFIG_NET_CLS_ACT
> - int err;
> - struct tc_action *act;
> -
> if (map->police && tb[map->police-1]) {
> + int err;
> + struct tc_action *act;
> act = tcf_action_init_1(tb[map->police-1], rate_tlv, "police",
> TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
> if (act == NULL)
> @@ -498,6 +497,8 @@
> act->type = TCA_OLD_COMPAT;
> exts->action = act;
> } else if (map->action && tb[map->action-1]) {
> + int err;
> + struct tc_action *act;
> act = tcf_action_init(tb[map->action-1], rate_tlv, NULL,
> TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
> if (act == NULL)
yes, that's the obvious one, but it uses a little more stack space.
An uglier but more efficient approach is to whack braces around the whole
thing.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] PKT_SCHED: remove c99ism, Thomas Graf |
|---|---|
| Next by Date: | Re: Multicast on b44, Pekka Pietikainen |
| Previous by Thread: | [PATCH] PKT_SCHED: remove c99ism, Thomas Graf |
| Next by Thread: | [PATCH] PKT_SCHED: remove c99ism, Thomas Graf |
| Indexes: | [Date] [Thread] [Top] [All Lists] |