| 
    
 [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH][LINUX] fix 64 bit build warning in privcmd_ioctl()
 The following patch fixes a build warning on when sizeof(long) > sizeof(int). Actuall gcc message:xen/linux/linux-2.6/drivers/xen/privcmd/privcmd.c: In function 'privcmd_ioctl': xen/linux/linux-2.6/drivers/xen/privcmd/privcmd.c:180: warning: comparison is always false due to limited range of data type Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx> diff -r 4d4f0d52c193 linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c--- a/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c Thu Nov 09 15:37:17 2006 -0500 +++ b/linux-2.6-xen-sparse/drivers/xen/privcmd/privcmd.c Fri Nov 10 12:29:04 2006 -0500 
@@ -174,7 +174,7 @@ static int privcmd_ioctl(struct inode *i
                if (copy_from_user(&m, udata, sizeof(m)))
                        return -EFAULT;
-               if ((m.num <= 0) || (m.num > (LONG_MAX >> PAGE_SHIFT)))
+               if ((m.num <= 0) || (m.num > (INT_MAX >> PAGE_SHIFT)))
                        return -EINVAL;
                down_read(&mm->mmap_sem);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |