xfer_sum_len type bug

Wayne Davison wayne at opencoder.net
Fri May 26 15:34:20 UTC 2023

On Tue, May 16, 2023 at 2:03 PM Derek Martin wrote:

> This appears to be because of a type mismatch between xfer_sum_len
> (declared as [signed] int) and the third arugment to memset, whose
> function prototype is (from the man page):
>        void *memset(void *s, int c, size_t n);

If that is the case, why does it not complain about file_sum_len, which is
also an int that is passed to memset()? The only difference I see is that
xfer_sum_len's memset() is in match.c while file_sum_len's memset() is in
checksum.c, and the only difference I can see with that is that the int is
local to checksum.c and extern in match.c. Very strange. I'm more inclined
to change them into unsigned short values, as they are quite small integers.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20230526/47967305/attachment.htm>

More information about the rsync mailing list