From: Andrew Tridgell Date: Thu, 28 Mar 2002 04:22:40 +0000 (+0100) Subject: update the time on the stderr as well as the main hash file X-Git-Tag: v1.0~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46a88256bc2006a19508589b25a44daf4c78b4b4;p=thirdparty%2Fccache.git update the time on the stderr as well as the main hash file --- diff --git a/ccache.c b/ccache.c index 35333a741..8946da8e3 100644 --- a/ccache.c +++ b/ccache.c @@ -251,16 +251,18 @@ static void find_hash(ARGS *args) static void from_cache(int first) { int fd_stderr; - char *s; + char *stderr_file; int ret; - x_asprintf(&s, "%s.stderr", hashname); - fd_stderr = open(s, O_RDONLY); - free(s); + x_asprintf(&stderr_file, "%s.stderr", hashname); + fd_stderr = open(stderr_file, O_RDONLY); if (fd_stderr == -1) { /* it isn't in cache ... */ + free(stderr_file); return; } + utime(stderr_file, NULL); + free(stderr_file); unlink(output_file); ret = link(hashname, output_file);