summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d8b108c)
only once instead of over and over again.
extern struct filter_list_struct server_filter_list;
int io_error;
extern struct filter_list_struct server_filter_list;
int io_error;
dev_t filesystem_dev; /* used to implement -x */
static char empty_sum[MD4_SUM_LENGTH];
dev_t filesystem_dev; /* used to implement -x */
static char empty_sum[MD4_SUM_LENGTH];
/* Figure out how big the file_struct is without trailing padding */
file_struct_len = offsetof(struct file_struct, flags) + sizeof f.flags;
/* Figure out how big the file_struct is without trailing padding */
file_struct_len = offsetof(struct file_struct, flags) + sizeof f.flags;
+ checksum_len = protocol_version < 21 ? 2 : MD4_SUM_LENGTH;
}
static int show_filelist_p(void)
}
static int show_filelist_p(void)
if (always_checksum && (S_ISREG(mode) || protocol_version < 28)) {
char *sum;
if (always_checksum && (S_ISREG(mode) || protocol_version < 28)) {
char *sum;
- int slen = protocol_version < 21 ? 2 : MD4_SUM_LENGTH;
if (S_ISREG(mode))
sum = file->u.sum;
else {
/* Prior to 28, we sent a useless set of nulls. */
sum = empty_sum;
}
if (S_ISREG(mode))
sum = file->u.sum;
else {
/* Prior to 28, we sent a useless set of nulls. */
sum = empty_sum;
}
- write_buf(f, sum, slen);
+ write_buf(f, sum, checksum_len);
}
strlcpy(lastname, fname, MAXPATHLEN);
}
strlcpy(lastname, fname, MAXPATHLEN);
if (always_checksum && (sum_len || protocol_version < 28)) {
char *sum;
if (always_checksum && (sum_len || protocol_version < 28)) {
char *sum;
- int slen = protocol_version < 21 ? 2 : MD4_SUM_LENGTH;
if (sum_len) {
file->u.sum = sum = bp;
/*bp += sum_len;*/
if (sum_len) {
file->u.sum = sum = bp;
/*bp += sum_len;*/
/* Prior to 28, we get a useless set of nulls. */
sum = empty_sum;
}
/* Prior to 28, we get a useless set of nulls. */
sum = empty_sum;
}
- read_buf(f, sum, slen);
+ read_buf(f, sum, checksum_len);