From: Joel Rosdahl Date: Thu, 3 Jan 2013 16:51:10 +0000 (+0100) Subject: Improve x_unlink's temporary filename X-Git-Tag: v3.1.9~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd95cfa62c0753e076f74fa812a17b9b03ec9ea0;p=thirdparty%2Fccache.git Improve x_unlink's temporary filename The XXXXXX part was unused. --- diff --git a/util.c b/util.c index 9a91d4ccf..66be67d73 100644 --- a/util.c +++ b/util.c @@ -1,6 +1,6 @@ /* * Copyright (C) 2002 Andrew Tridgell - * Copyright (C) 2009-2012 Joel Rosdahl + * Copyright (C) 2009-2013 Joel Rosdahl * * 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 the Free @@ -1121,7 +1121,7 @@ x_unlink(const char *path) * file. We don't care if the temp file is trashed, so it's always safe to * unlink it first. */ - char* tmp_name = format("%s.%s.rmXXXXXX", path, tmp_string()); + char *tmp_name = format("%s.tmp.rm.%s", path, tmp_string()); int result = 0; cc_log("Unlink %s via %s", path, tmp_name); if (x_rename(path, tmp_name) == -1) {