[PATCH] fix __FUNCTION__ use in ip_nat_helper.c

rudmer@legolas.dynup.net
1 Sep 2002 07:49:25 -0000


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);
}
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/