patch-2.1.30 linux/net/rose/af_rose.c
Next file: linux/net/rose/rose_dev.c
Previous file: linux/net/netsyms.c
Back to the patch index
Back to the overall index
- Lines: 45
- Date:
Thu Mar 20 18:17:16 1997
- Orig file:
v2.1.29/linux/net/rose/af_rose.c
- Orig date:
Thu Feb 27 10:57:32 1997
diff -u --recursive --new-file v2.1.29/linux/net/rose/af_rose.c linux/net/rose/af_rose.c
@@ -469,13 +469,13 @@
if (level != SOL_ROSE)
return -ENOPROTOOPT;
- if(optlen<sizeof(int))
+ if (optlen < sizeof(int))
return -EINVAL;
- if(get_user(opt, (int *)optval))
+
+ if (get_user(opt, (int *)optval))
return -EFAULT;
- switch (optname)
- {
+ switch (optname) {
case ROSE_T1:
if (opt < 1)
return -EINVAL;
@@ -525,7 +525,7 @@
if (level != SOL_ROSE)
return -ENOPROTOOPT;
- if(get_user(len,optlen))
+ if (get_user(len, optlen))
return -EFAULT;
switch (optname) {
@@ -557,11 +557,14 @@
return -ENOPROTOOPT;
}
- len=min(len,sizeof(int));
- if(put_user(len,optlen))
+ len = min(len, sizeof(int));
+
+ if (put_user(len, optlen))
return -EFAULT;
- if(copy_to_user(optval,&val,len))
+
+ if (copy_to_user(optval, &val, len))
return -EFAULT;
+
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov