From: Michael Adam Date: Wed, 18 Jul 2007 08:29:00 +0000 (+0000) Subject: r23950: unlink before rename is superfluous. X-Git-Tag: samba-misc-tags/initial-v3-2-unstable~670 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63c4c40cf7055ab7cf413a23e306cf209a1dd0a1;p=thirdparty%2Fsamba.git r23950: unlink before rename is superfluous. Michael --- diff --git a/source/lib/tdb/tools/tdbbackup.c b/source/lib/tdb/tools/tdbbackup.c index a161085798d..dedfb9e6656 100644 --- a/source/lib/tdb/tools/tdbbackup.c +++ b/source/lib/tdb/tools/tdbbackup.c @@ -177,7 +177,6 @@ static int backup_tdb(const char *old_name, const char *new_name, int hash_size) /* close the new tdb and rename it to .bak */ tdb_close(tdb_new); - unlink(new_name); if (rename(tmp_name, new_name) != 0) { perror(new_name); free(tmp_name);