2002-09-01 07:45:02

by Rudmer van Dijk

[permalink] [raw]
Subject: [PATCH] fix __FUNCTION__ use in ip_nat_helper.c

Hi,
I got the following errors:

CC net/ipv4/netfilter/ip_nat_helper.o
ip_nat_helper.c: In function `ip_nat_helper_register':
ip_nat_helper.c:385: parse error before string constant
ip_nat_helper.c: In function `ip_nat_helper_unregister':
ip_nat_helper.c:470: parse error before string constant
ip_nat_helper.c:471: warning: left-hand operand of comma expression has no effect
ip_nat_helper.c:471: parse error before `)'
make[3]: *** [ip_nat_helper.o] Error 1
make[2]: *** [netfilter] Error 2
make[1]: *** [ipv4] Error 2
make: *** [net] Error 2

both due to bad use of __FUNCTION__ patch follows

Rudmer

--- linux-2.5.33/net/ipv4/netfilter/ip_nat_helper.c.orig Sun Sep 1 09:23:54 2002
+++ linux-2.5.33/net/ipv4/netfilter/ip_nat_helper.c Sun Sep 1 09:28:13 2002
@@ -382,9 +382,9 @@
const char *tmp = me->me->name;

if (strlen(tmp) + 6 > MODULE_MAX_NAMELEN) {
- printk(__FUNCTION__ ": unable to "
+ printk("%s: unable to "
"compute conntrack helper name "
- "from %s\n", tmp);
+ "from %s\n", __FUNCTION__, tmp);
return -EBUSY;
}
tmp += 6;
@@ -467,7 +467,8 @@
&& ct_helper->me) {
__MOD_DEC_USE_COUNT(ct_helper->me);
} else
- printk(__FUNCTION__ ": unable to decrement usage count"
- " of conntrack helper %s\n", me->me->name);
+ printk("%s: unable to decrement usage count"
+ " of conntrack helper %s\n",
+ __FUNCTION__, me->me->name);
}
}


2002-09-01 07:48:44

by Rudmer van Dijk

[permalink] [raw]
Subject: Re: [PATCH] fix __FUNCTION__ use in ip_nat_helper.c


>Hi,
>I got the following errors:
>
>both due to bad use of __FUNCTION__ patch follows
forgot to mention it, but it is against 2.5.33

Rudmer

2002-09-01 07:52:19

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] fix __FUNCTION__ use in ip_nat_helper.c

From: [email protected]
Date: 1 Sep 2002 07:49:25 -0000

both due to bad use of __FUNCTION__ patch follows

Rusty no need to take this, I pushed it to Linus about
an hour ago.