Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New --keep-dirlinks option.
[rsync/rsync.git]
/
checksum.c
diff --git
a/checksum.c
b/checksum.c
index
57dac48
..
ce30e72
100644
(file)
--- a/
checksum.c
+++ b/
checksum.c
@@
-23,7
+23,7
@@
int csum_length=2; /* initial value */
#define CSUM_CHUNK 64
#define CSUM_CHUNK 64
-
int checksum_seed = 0
;
+
extern int checksum_seed
;
extern int protocol_version;
/*
extern int protocol_version;
/*
@@
-58,7
+58,7
@@
void get_checksum2(char *buf,int len,char *sum)
if (len > len1) {
if (buf1) free(buf1);
if (len > len1) {
if (buf1) free(buf1);
- buf1 =
(char *)malloc(
len+4);
+ buf1 =
new_array(char,
len+4);
len1 = len;
if (!buf1) out_of_memory("get_checksum2");
}
len1 = len;
if (!buf1) out_of_memory("get_checksum2");
}
@@
-135,13
+135,13
@@
static int sumresidue;
static char sumrbuf[CSUM_CHUNK];
static struct mdfour md;
static char sumrbuf[CSUM_CHUNK];
static struct mdfour md;
-void sum_init(
voi
d)
+void sum_init(
int see
d)
{
char s[4];
mdfour_begin(&md);
{
char s[4];
mdfour_begin(&md);
- sumresidue
=
0;
- SIVAL(s,
0,checksum_
seed);
- sum_update(s,4);
+ sumresidue
=
0;
+ SIVAL(s,
0,
seed);
+ sum_update(s,
4);
}
/**
}
/**