OSDN Git Service

appletalk: Fix potential NULL pointer dereference in unregister_snap_client
[uclinux-h8/linux.git] / include / linux / atalk.h
index 5a90f28..f6034ba 100644 (file)
@@ -108,7 +108,7 @@ static __inline__ struct elapaarp *aarp_hdr(struct sk_buff *skb)
 #define AARP_RESOLVE_TIME      (10 * HZ)
 
 extern struct datalink_proto *ddp_dl, *aarp_dl;
-extern void aarp_proto_init(void);
+extern int aarp_proto_init(void);
 
 /* Inter module exports */
 
@@ -161,16 +161,26 @@ extern int sysctl_aarp_resolve_time;
 extern int atalk_register_sysctl(void);
 extern void atalk_unregister_sysctl(void);
 #else
-#define atalk_register_sysctl()                do { } while(0)
-#define atalk_unregister_sysctl()      do { } while(0)
+static inline int atalk_register_sysctl(void)
+{
+       return 0;
+}
+static inline void atalk_unregister_sysctl(void)
+{
+}
 #endif
 
 #ifdef CONFIG_PROC_FS
 extern int atalk_proc_init(void);
 extern void atalk_proc_exit(void);
 #else
-#define atalk_proc_init()      ({ 0; })
-#define atalk_proc_exit()      do { } while(0)
+static inline int atalk_proc_init(void)
+{
+       return 0;
+}
+static inline void atalk_proc_exit(void)
+{
+}
 #endif /* CONFIG_PROC_FS */
 
 #endif /* __LINUX_ATALK_H__ */