diff options
author | Wayne Davison <wayned@samba.org> | 2006-10-14 20:31:33 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2006-10-14 20:31:33 +0000 |
commit | 434c40986d1f3d2e2a3da49a6e1528aad0daa0b8 (patch) | |
tree | 60aa379c23383f60e2eb9054b025900b44f144a1 | |
parent | 8ee685770204d18a776556251be5752304ec78d4 (diff) | |
download | rsync-434c40986d1f3d2e2a3da49a6e1528aad0daa0b8.tar.gz |
Use the MAX_RENAMES_DIGITS define in the relevant snprintf().
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |