All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH PKT_SCHED 5/22]: act_api.c: remove unnecessary initializations
@ 2005-01-10 19:37 Patrick McHardy
  0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2005-01-10 19:37 UTC (permalink / raw)
  To: jamal; +Cc: Maillist netdev

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 05.diff --]
[-- Type: text/x-patch, Size: 2822 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/01/09 22:52:33+01:00 kaber@coreworks.de 
#   [PKT_SCHED]: act_api.c: remove unnecessary initializations
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
# net/sched/act_api.c
#   2005/01/09 22:52:25+01:00 kaber@coreworks.de +10 -13
#   [PKT_SCHED]: act_api.c: remove unnecessary initializations
#   
#   Signed-off-by: Patrick McHardy <kaber@trash.net>
# 
diff -Nru a/net/sched/act_api.c b/net/sched/act_api.c
--- a/net/sched/act_api.c	2005-01-10 06:22:01 +01:00
+++ b/net/sched/act_api.c	2005-01-10 06:22:01 +01:00
@@ -274,7 +274,7 @@
 	struct tc_action_ops *a_o;
 	char act_name[4 + IFNAMSIZ + 1];
 	struct rtattr *tb[TCA_ACT_MAX+1];
-	struct rtattr *kind = NULL;
+	struct rtattr *kind;
 
 	*err = -EINVAL;
 
@@ -494,7 +494,7 @@
 	struct tc_action_ops *a_o;
 	char act_name[4 + IFNAMSIZ + 1];
 	struct rtattr *tb[TCA_ACT_MAX+1];
-	struct rtattr *kind = NULL;
+	struct rtattr *kind;
 	int index;
 	int err = -EINVAL;
 
@@ -563,7 +563,7 @@
 static struct tc_action_ops *get_ao(struct rtattr *kind, struct tc_action *a)
 {
 	char act_name[4 + IFNAMSIZ + 1];
-	struct tc_action_ops *a_o = NULL;
+	struct tc_action_ops *a_o;
 
 	if (kind != NULL) {
 		sprintf(act_name, "%s", (char*)RTA_DATA(kind));
@@ -596,7 +596,7 @@
 
 static struct tc_action *create_a(int i)
 {
-	struct tc_action *act = NULL;
+	struct tc_action *act;
 
 	act = kmalloc(sizeof(*act), GFP_KERNEL);
 	if (act == NULL) {
@@ -617,7 +617,7 @@
 	struct netlink_callback dcb;
 	struct rtattr *x;
 	struct rtattr *tb[TCA_ACT_MAX+1];
-	struct rtattr *kind = NULL;
+	struct rtattr *kind;
 	struct tc_action *a = create_a(0);
 	int err = -EINVAL;
 
@@ -677,9 +677,8 @@
 static int
 tca_action_gd(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int event)
 {
-	int s = 0;
 	int i, ret = 0;
-	struct tc_action *act = NULL;
+	struct tc_action *act;
 	struct rtattr *tb[TCA_ACT_MAX_PRIO+1];
 	struct tc_action *a = NULL, *a_s = NULL;
 
@@ -707,10 +706,8 @@
 		} else
 			a = act;
 
-		if (!s) {
-			s = 1;
+		if (a_s == NULL)
 			a_s = a;
-		}
 
 		ret = tcf_action_get_1(tb[i], act, n, pid);
 		if (ret < 0) {
@@ -800,8 +797,8 @@
 tcf_action_add(struct rtattr *rta, struct nlmsghdr *n, u32 pid, int ovr)
 {
 	int ret = 0;
-	struct tc_action *act = NULL;
-	struct tc_action *a = NULL;
+	struct tc_action *act;
+	struct tc_action *a;
 	u32 seq = n->nlmsg_seq;
 
 	act = tcf_action_init(rta, NULL, NULL, ovr, 0, &ret);
@@ -865,7 +862,7 @@
 	struct rtattr *tb1, *tb2[TCA_ACT_MAX+1];
 	struct rtattr *tb[TCA_ACT_MAX_PRIO + 1];
 	struct rtattr *rta[TCAA_MAX + 1];
-	struct rtattr *kind = NULL;
+	struct rtattr *kind;
 	int min_len = NLMSG_LENGTH(sizeof(struct tcamsg));
 	int attrlen = n->nlmsg_len - NLMSG_ALIGN(min_len);
 	struct rtattr *attr = (void *) n + NLMSG_ALIGN(min_len);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-10 19:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-10 19:37 [PATCH PKT_SCHED 5/22]: act_api.c: remove unnecessary initializations Patrick McHardy

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.