patch-2.3.16 linux/net/x25/af_x25.c

Next file: linux/net/x25/sysctl_net_x25.c
Previous file: linux/net/wanrouter/wanproc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/net/x25/af_x25.c linux/net/x25/af_x25.c
@@ -1055,22 +1055,22 @@
 
 	switch (cmd) {
 		case TIOCOUTQ: {
-			long amount;
+			int amount;
 			amount = sk->sndbuf - atomic_read(&sk->wmem_alloc);
 			if (amount < 0)
 				amount = 0;
-			if (put_user(amount, (unsigned long *)arg))
+			if (put_user(amount, (unsigned int *)arg))
 				return -EFAULT;
 			return 0;
 		}
 
 		case TIOCINQ: {
 			struct sk_buff *skb;
-			long amount = 0L;
+			int amount = 0;
 			/* These two are safe on a single CPU system as only user tasks fiddle here */
 			if ((skb = skb_peek(&sk->receive_queue)) != NULL)
 				amount = skb->len;
-			if (put_user(amount, (unsigned long *)arg))
+			if (put_user(amount, (unsigned int *)arg))
 				return -EFAULT;
 			return 0;
 		}
@@ -1298,7 +1298,7 @@
 };
 #endif	
 
-__initfunc(void x25_proto_init(struct net_proto *pro))
+void __init x25_proto_init(struct net_proto *pro)
 {
 	sock_register(&x25_family_ops);
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)