Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
a261989c
Commit
a261989c
authored
Jan 25, 2002
by
Martin Pool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More signedness fixes; should be harmless.
parent
7b5c3eb0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
13 deletions
+15
-13
fileio.c
fileio.c
+6
-4
flist.c
flist.c
+1
-1
match.c
match.c
+3
-3
receiver.c
receiver.c
+2
-2
sender.c
sender.c
+2
-2
util.c
util.c
+1
-1
No files found.
fileio.c
View file @
a261989c
/*
Copyright (C) Andrew Tridgell 1998
Copyright (C) 2002 by Martin Pool
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -38,7 +39,7 @@ int sparse_end(int f)
static
int
write_sparse
(
int
f
,
char
*
buf
,
size_t
len
)
{
int
l1
=
0
,
l2
=
0
;
size_t
l1
=
0
,
l2
=
0
;
int
ret
;
for
(
l1
=
0
;
l1
<
len
&&
buf
[
l1
]
==
0
;
l1
++
)
;
...
...
@@ -56,10 +57,11 @@ static int write_sparse(int f,char *buf,size_t len)
if
(
l1
==
len
)
return
len
;
if
((
ret
=
write
(
f
,
buf
+
l1
,
len
-
(
l1
+
l2
)))
!=
len
-
(
l1
+
l2
))
{
if
(
ret
==
-
1
||
ret
==
0
)
return
ret
;
ret
=
write
(
f
,
buf
+
l1
,
len
-
(
l1
+
l2
));
if
(
ret
==
-
1
||
ret
==
0
)
return
ret
;
else
if
(
ret
!=
(
int
)
(
len
-
(
l1
+
l2
)))
return
(
l1
+
ret
);
}
if
(
l2
>
0
)
do_lseek
(
f
,
l2
,
SEEK_CUR
);
...
...
flist.c
View file @
a261989c
...
...
@@ -980,7 +980,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
}
if
(
f
!=
-
1
)
{
io_end_buffering
(
f
);
io_end_buffering
();
stats
.
flist_size
=
stats
.
total_written
-
start_write
;
stats
.
num_files
=
flist
->
count
;
if
(
write_batch
)
/* dw */
...
...
match.c
View file @
a261989c
...
...
@@ -71,7 +71,7 @@ static void build_hash_table(struct sum_struct *s)
if
(
!
tag_table
||
!
targets
)
out_of_memory
(
"build_hash_table"
);
for
(
i
=
0
;
i
<
s
->
count
;
i
++
)
{
for
(
i
=
0
;
i
<
(
int
)
s
->
count
;
i
++
)
{
targets
[
i
].
i
=
i
;
targets
[
i
].
t
=
gettag
(
s
->
sums
[
i
].
sum1
);
}
...
...
@@ -175,7 +175,7 @@ static void hash_search(int f,struct sum_struct *s,
sum
=
(
s1
&
0xffff
)
|
(
s2
<<
16
);
tag_hits
++
;
for
(;
j
<
s
->
count
&&
targets
[
j
].
t
==
t
;
j
++
)
{
for
(;
j
<
(
int
)
s
->
count
&&
targets
[
j
].
t
==
t
;
j
++
)
{
int
l
,
i
=
targets
[
j
].
i
;
if
(
sum
!=
s
->
sums
[
i
].
sum1
)
continue
;
...
...
@@ -201,7 +201,7 @@ static void hash_search(int f,struct sum_struct *s,
/* we've found a match, but now check to see
if last_i can hint at a better match */
for
(
j
++
;
j
<
s
->
count
&&
targets
[
j
].
t
==
t
;
j
++
)
{
for
(
j
++
;
j
<
(
int
)
s
->
count
&&
targets
[
j
].
t
==
t
;
j
++
)
{
int
i2
=
targets
[
j
].
i
;
if
(
i2
==
last_i
+
1
)
{
if
(
sum
!=
s
->
sums
[
i2
].
sum1
)
break
;
...
...
receiver.c
View file @
a261989c
...
...
@@ -249,7 +249,7 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
i
=
-
(
i
+
1
);
offset2
=
i
*
(
OFF_T
)
n
;
len
=
n
;
if
(
i
==
count
-
1
&&
remainder
!=
0
)
if
(
i
==
(
int
)
count
-
1
&&
remainder
!=
0
)
len
=
remainder
;
stats
.
matched_data
+=
len
;
...
...
@@ -265,7 +265,7 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
sum_update
(
map
,
len
);
}
if
(
fd
!=
-
1
&&
write_file
(
fd
,
map
,
len
)
!=
len
)
{
if
(
fd
!=
-
1
&&
write_file
(
fd
,
map
,
len
)
!=
(
int
)
len
)
{
rprintf
(
FERROR
,
"write failed on %s : %s
\n
"
,
fname
,
strerror
(
errno
));
exit_cleanup
(
RERR_FILEIO
);
...
...
sender.c
View file @
a261989c
...
...
@@ -55,14 +55,14 @@ static struct sum_struct *receive_sums(int f)
s
->
sums
=
(
struct
sum_buf
*
)
malloc
(
sizeof
(
s
->
sums
[
0
])
*
s
->
count
);
if
(
!
s
->
sums
)
out_of_memory
(
"receive_sums"
);
for
(
i
=
0
;
i
<
s
->
count
;
i
++
)
{
for
(
i
=
0
;
i
<
(
int
)
s
->
count
;
i
++
)
{
s
->
sums
[
i
].
sum1
=
read_int
(
f
);
read_buf
(
f
,
s
->
sums
[
i
].
sum2
,
csum_length
);
s
->
sums
[
i
].
offset
=
offset
;
s
->
sums
[
i
].
i
=
i
;
if
(
i
==
s
->
count
-
1
&&
s
->
remainder
!=
0
)
{
if
(
i
==
(
int
)
s
->
count
-
1
&&
s
->
remainder
!=
0
)
{
s
->
sums
[
i
].
len
=
s
->
remainder
;
}
else
{
s
->
sums
[
i
].
len
=
s
->
n
;
...
...
util.c
View file @
a261989c
...
...
@@ -559,7 +559,7 @@ static void glob_expand_one(char *s, char **argv, int *argc, int maxargs)
globfree
(
&
globbuf
);
return
;
}
for
(
i
=
0
;
i
<
(
maxargs
-
(
*
argc
))
&&
i
<
globbuf
.
gl_pathc
;
i
++
)
{
for
(
i
=
0
;
i
<
(
maxargs
-
(
*
argc
))
&&
i
<
(
int
)
globbuf
.
gl_pathc
;
i
++
)
{
if
(
i
==
0
)
free
(
argv
[
*
argc
]);
argv
[(
*
argc
)
+
i
]
=
strdup
(
globbuf
.
gl_pathv
[
i
]);
if
(
!
argv
[(
*
argc
)
+
i
])
out_of_memory
(
"glob_expand"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment