Skip to contentSkip to conversation

fix __FUNCTION__ use in ip_nat_helper.c

PATCH In review [email protected] 2 participants 3 messages Sep 1, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

net/ipv4/netfilter/ip_nat_helper.c renamed from net/ipv4/netfilter/ip_nat_helper.c.orig +5 -4
@@ -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);
 	}
 }
#1 lore raw
Quoted 5 lines

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