patch-2.4.10 linux/drivers/char/selection.c
Next file: linux/drivers/char/ser_a2232.c
Previous file: linux/drivers/char/sbc60xxwdt.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Fri Sep 7 09:28:38 2001
- Orig file:
v2.4.9/linux/drivers/char/selection.c
- Orig date:
Fri Feb 9 11:30:22 2001
diff -u --recursive --new-file v2.4.9/linux/drivers/char/selection.c linux/drivers/char/selection.c
@@ -96,11 +96,7 @@
/* set inwordLut contents. Invoked by ioctl(). */
int sel_loadlut(const unsigned long arg)
{
- int err = -EFAULT;
-
- if (!copy_from_user(inwordLut, (u32 *)(arg+4), 32))
- err = 0;
- return err;
+ return copy_from_user(inwordLut, (u32 *)(arg+4), 32) ? -EFAULT : 0;
}
/* does screen address p correspond to character at LH/RH edge of screen? */
@@ -130,15 +126,13 @@
args = (unsigned short *)(arg + 1);
if (user) {
- int err;
- err = verify_area(VERIFY_READ, args, sizeof(short) * 5);
- if (err)
- return err;
- get_user(xs, args++);
- get_user(ys, args++);
- get_user(xe, args++);
- get_user(ye, args++);
- get_user(sel_mode, args);
+ if (verify_area(VERIFY_READ, args, sizeof(short) * 5))
+ return -EFAULT;
+ __get_user(xs, args++);
+ __get_user(ys, args++);
+ __get_user(xe, args++);
+ __get_user(ye, args++);
+ __get_user(sel_mode, args);
} else {
xs = *(args++); /* set selection from kernel */
ys = *(args++);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)