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
don't show basedir in printed path (a aesthetic change only)
[rsync/rsync.git]
/
checksum.c
diff --git
a/checksum.c
b/checksum.c
index
2015836
..
32299f0
100644
(file)
--- a/
checksum.c
+++ b/
checksum.c
@@
-30,10
+30,11
@@
extern int remote_version;
a simple 32 bit checksum that can be upadted from either end
(inspired by Mark Adler's Adler-32 checksum)
*/
a simple 32 bit checksum that can be upadted from either end
(inspired by Mark Adler's Adler-32 checksum)
*/
-uint32 get_checksum1(char *buf,int len)
+uint32 get_checksum1(char *buf
1
,int len)
{
int i;
uint32 s1, s2;
{
int i;
uint32 s1, s2;
+ signed char *buf = (signed char *)buf1;
s1 = s2 = 0;
for (i = 0; i < (len-4); i+=4) {
s1 = s2 = 0;
for (i = 0; i < (len-4); i+=4) {
@@
-64,8
+65,8
@@
void get_checksum2(char *buf,int len,char *sum)
{
int i;
MDstruct MD;
{
int i;
MDstruct MD;
- static char *buf1
= NULL
;
- static int len1
= 0
;
+ static char *buf1;
+ static int len1;
if (len > len1) {
if (buf1) free(buf1);
if (len > len1) {
if (buf1) free(buf1);
@@
-94,11
+95,11
@@
void get_checksum2(char *buf,int len,char *sum)
void file_checksum(char *fname,char *sum,off_t size)
{
void file_checksum(char *fname,char *sum,off_t size)
{
-
in
t i;
+
off_
t i;
MDstruct MD;
struct map_struct *buf;
int fd;
MDstruct MD;
struct map_struct *buf;
int fd;
-
in
t len = size;
+
off_
t len = size;
char tmpchunk[CSUM_CHUNK];
bzero(sum,csum_length);
char tmpchunk[CSUM_CHUNK];
bzero(sum,csum_length);