aboutsummaryrefslogtreecommitdiffstats
path: root/fs/select.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-04-10 22:52:46 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 06:18:30 -0700
commit29ff2db55196717e2e67e0f04adc833ee7edd491 (patch)
tree7f68496e093a294d60939b60aa204ff16fb9633a /fs/select.c
parent[PATCH] sched: don't awaken RT tasks on expired array (diff)
downloadlinux-dev-29ff2db55196717e2e67e0f04adc833ee7edd491.tar.xz
linux-dev-29ff2db55196717e2e67e0f04adc833ee7edd491.zip
[PATCH] select() warning fixes
fs/select.c: In function `core_sys_select': fs/select.c:339: warning: assignment from incompatible pointer type fs/select.c:376: warning: comparison of distinct pointer types lacks a cast By using a void* we can remove lots of casts rather than adding more. Cc: Jes Sorensen <jes@trained-monkey.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/select.c')
-rw-r--r--fs/select.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/select.c b/fs/select.c
index 071660fa7b01..fce0fd1bb1d1 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -310,7 +310,7 @@ static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
fd_set __user *exp, s64 *timeout)
{
fd_set_bits fds;
- char *bits;
+ void *bits;
int ret, size, max_fdset;
struct fdtable *fdt;
/* Allocate small arguments on the stack to save memory and be faster */
@@ -341,12 +341,12 @@ static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
bits = kmalloc(6 * size, GFP_KERNEL);
if (!bits)
goto out_nofds;
- fds.in = (unsigned long *) bits;
- fds.out = (unsigned long *) (bits + size);
- fds.ex = (unsigned long *) (bits + 2*size);
- fds.res_in = (unsigned long *) (bits + 3*size);
- fds.res_out = (unsigned long *) (bits + 4*size);
- fds.res_ex = (unsigned long *) (bits + 5*size);
+ fds.in = bits;
+ fds.out = bits + size;
+ fds.ex = bits + 2*size;
+ fds.res_in = bits + 3*size;
+ fds.res_out = bits + 4*size;
+ fds.res_ex = bits + 5*size;
if ((ret = get_fd_set(n, inp, fds.in)) ||
(ret = get_fd_set(n, outp, fds.out)) ||