From: Thomas Graf <tgraf@suug.ch>
To: Andrew Morton <akpm@osdl.org>
Cc: davem@davemloft.net, netdev@oss.sgi.com
Subject: [PATCH] PKT_SCHED: remove c99ism
Date: Sun, 16 Jan 2005 00:40:56 +0100 [thread overview]
Message-ID: <20050115234056.GT26856@postel.suug.ch> (raw)
In-Reply-To: <20050115153202.2f7f81c6.akpm@osdl.org>
* Andrew Morton <20050115153202.2f7f81c6.akpm@osdl.org> 2005-01-15 15:32
> An uglier but more efficient approach is to whack braces around the whole
> thing.
Fine with me as well. The code isn't used that often and not deep in the
calling stack which is why I preferred the cleaner way first.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
--- linux-2.6.11-rc1-bk2.orig/net/sched/cls_api.c 2005-01-16 00:04:40.000000000 +0100
+++ linux-2.6.11-rc1-bk2/net/sched/cls_api.c 2005-01-16 00:34:53.000000000 +0100
@@ -486,24 +486,26 @@
memset(exts, 0, sizeof(*exts));
#ifdef CONFIG_NET_CLS_ACT
- int err;
- struct tc_action *act;
+ {
+ int err;
+ struct tc_action *act;
- if (map->police && tb[map->police-1]) {
- act = tcf_action_init_1(tb[map->police-1], rate_tlv, "police",
- TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
- if (act == NULL)
- return err;
-
- act->type = TCA_OLD_COMPAT;
- exts->action = act;
- } else if (map->action && tb[map->action-1]) {
- act = tcf_action_init(tb[map->action-1], rate_tlv, NULL,
- TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
- if (act == NULL)
- return err;
+ if (map->police && tb[map->police-1]) {
+ act = tcf_action_init_1(tb[map->police-1], rate_tlv, "police",
+ TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
+ if (act == NULL)
+ return err;
+
+ act->type = TCA_OLD_COMPAT;
+ exts->action = act;
+ } else if (map->action && tb[map->action-1]) {
+ act = tcf_action_init(tb[map->action-1], rate_tlv, NULL,
+ TCA_ACT_NOREPLACE, TCA_ACT_BIND, &err);
+ if (act == NULL)
+ return err;
- exts->action = act;
+ exts->action = act;
+ }
}
#elif defined CONFIG_NET_CLS_POLICE
if (map->police && tb[map->police-1]) {
next prev parent reply other threads:[~2005-01-15 23:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-15 22:40 c99ism in latest linus -bk Andrew Morton
2005-01-15 23:25 ` [PATCH] PKT_SCHED: remove c99ism Thomas Graf
2005-01-15 23:32 ` Andrew Morton
2005-01-15 23:40 ` Thomas Graf [this message]
2005-01-17 9:09 ` Herbert Poetzl
2005-01-17 11:56 ` Thomas Graf
2005-01-17 21:40 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050115234056.GT26856@postel.suug.ch \
--to=tgraf@suug.ch \
--cc=akpm@osdl.org \
--cc=davem@davemloft.net \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.