Arjan van de Ven wrote:
> --- linux/fs/adfs/dir.c.org Sat Mar 11 10:49:54 2000
> +++ linux/fs/adfs/dir.c Sat Mar 11 16:16:26 2000
> @@ -38,8 +38,11 @@
> ret = ops->read(sb, inode->i_ino, inode->i_size, &dir);
> if (ret)
> goto out;
> +
> + if ((filp->f_pos>>32)!=0)
> + BUG();
>
> - switch (filp->f_pos) {
> + switch ((unsigned int)filp->f_pos) {
Don't code in unneccesary dependance that (sizeof int)==32.
if ((filp->f_pos >> BITS_PER_LONG) != 0)
return 0;
switch ((unsigned long) filp->f_pos) {
The only problem is that you'll now get a compiler warning if sizeof(unsigned
long)==sizeof(unsigned long long)... for instance, alpha You can avoid
this with:
#if (-1ULL >> BITS_PER_LONG) != 0
if ((filp->f_pos >> BITS_PER_LONG) != 0)
return 0;
#endif
switch ((unsigned long) filp->f_pos) {
Another posibility is to keep the ">> 32" there and just cast to a "u32"
type.
-Mitch
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:20 EST