Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ee6857
)
Use the MAX_RENAMES_DIGITS define in the relevant snprintf().
author
Wayne Davison
<wayned@samba.org>
Sat, 14 Oct 2006 20:31:33 +0000
(20:31 +0000)
committer
Wayne Davison
<wayned@samba.org>
Sat, 14 Oct 2006 20:31:33 +0000
(20:31 +0000)
util.c
patch
|
blob
|
blame
|
history
diff --git
a/util.c
b/util.c
index
0887e7f
..
632a242
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-359,7
+359,7
@@
int robust_unlink(const char *fname)
/* start where the last one left off to reduce chance of clashes */
start = counter;
do {
- snprintf(&path[pos],
4
, "%03d", counter);
+ snprintf(&path[pos],
MAX_RENAMES_DIGITS+1
, "%03d", counter);
if (++counter >= MAX_RENAMES)
counter = 1;
} while ((rc = access(path, 0)) == 0 && counter != start);