]> git.hungrycats.org Git - linux/commitdiff
[NET]: Fix pointer arith in ICMP stats.
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>
Tue, 1 Apr 2003 01:08:10 +0000 (17:08 -0800)
committerJames Morris <jmorris@intercode.com.au>
Tue, 1 Apr 2003 01:08:10 +0000 (17:08 -0800)
include/net/icmp.h

index 2e11a0b2355cd995a080448bb1b63c1b5df4cf34..81c6a6c84e02d5d97cc8354642f457e107c72442 100644 (file)
@@ -39,15 +39,15 @@ DECLARE_SNMP_STAT(struct icmp_mib, icmp_statistics);
 #define ICMP_INC_STATS_FIELD(offt)                                     \
        (*((unsigned long *) ((void *)                                  \
                             per_cpu_ptr(icmp_statistics[!in_softirq()],\
-                                        smp_processor_id())) + offt))++;
+                                        smp_processor_id()) + offt)))++
 #define ICMP_INC_STATS_BH_FIELD(offt)                                  \
        (*((unsigned long *) ((void *)                                  \
                             per_cpu_ptr(icmp_statistics[0],            \
-                                        smp_processor_id())) + offt))++;
+                                        smp_processor_id()) + offt)))++
 #define ICMP_INC_STATS_USER_FIELD(offt)                                        \
        (*((unsigned long *) ((void *)                                  \
                             per_cpu_ptr(icmp_statistics[1],            \
-                                        smp_processor_id())) + offt))++;
+                                        smp_processor_id()) + offt)))++
 
 extern void    icmp_send(struct sk_buff *skb_in,  int type, int code, u32 info);
 extern int     icmp_rcv(struct sk_buff *skb);