X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/a8726d2a0695073a6321ec030eebb2af8709a21d..84a3efa0abf63d0e30909722f5b8331aa4052b4b:/flist.c diff --git a/flist.c b/flist.c index 6a11d0f9..6baa8bf8 100644 --- a/flist.c +++ b/flist.c @@ -367,12 +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) + rdev = file->u.rdev; + if ((rdev & ~(DEV64_T)0xFF) == rdev_high) flags |= XMIT_SAME_HIGH_RDEV; - else { - rdev = file->u.rdev; - rdev_high = rdev & ~0xFF; - } + else + rdev_high = rdev & ~(DEV64_T)0xFF; } } if (file->uid == uid) @@ -594,7 +593,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); }