From: Wayne Davison Date: Thu, 8 Apr 2004 21:51:49 +0000 (+0000) Subject: Explicitly cast our ~0xFF mask using ~(DEV64_T)0xFF, just to be sure X-Git-Tag: v2.6.1pre2~48 X-Git-Url: http://git.samba.org/samba.git/?p=rsync.git;a=commitdiff_plain;h=e2e053bbd78582a34e9252202423ca26e9267320 Explicitly cast our ~0xFF mask using ~(DEV64_T)0xFF, just to be sure (sign-extention would have probably made the former work OK). --- diff --git a/flist.c b/flist.c index 6a11d0f9..0890f9eb 100644 --- a/flist.c +++ b/flist.c @@ -367,11 +367,11 @@ void send_file_entry(struct file_struct *file, int f, unsigned short base_flags) } else rdev = 0; } else if (IS_DEVICE(mode)) { - if ((file->u.rdev & ~0xFF) == rdev_high) + if ((file->u.rdev & ~(DEV64_T)0xFF) == rdev_high) flags |= XMIT_SAME_HIGH_RDEV; else { rdev = file->u.rdev; - rdev_high = rdev & ~0xFF; + rdev_high = rdev & ~(DEV64_T)0xFF; } } } @@ -594,7 +594,7 @@ void receive_file_entry(struct file_struct **fptr, unsigned short flags, } else if (IS_DEVICE(mode)) { if (!(flags & XMIT_SAME_HIGH_RDEV)) { rdev = (DEV64_T)read_int(f); - rdev_high = rdev & ~0xFF; + rdev_high = rdev & ~(DEV64_T)0xFF; } else rdev = rdev_high | (DEV64_T)read_byte(f); }