From: Joel Rosdahl Date: Sun, 12 Sep 2010 14:36:48 +0000 (+0200) Subject: Rename test_if_compressed() to file_is_compressed() X-Git-Tag: v3.1~6 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8d70fc3f1730d338be3ddc6d789a31ce970478ee;p=thirdparty%2Fccache.git Rename test_if_compressed() to file_is_compressed() --- diff --git a/ccache.c b/ccache.c index ef99d814f..c8c65892d 100644 --- a/ccache.c +++ b/ccache.c @@ -995,7 +995,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) } else { unlink(output_obj); /* only make a hardlink if the cache file is uncompressed */ - if (getenv("CCACHE_HARDLINK") && test_if_compressed(cached_obj) == 0) { + if (getenv("CCACHE_HARDLINK") && file_is_compressed(cached_obj) == 0) { ret = link(cached_obj, output_obj); } else { ret = copy_file(cached_obj, output_obj, 0); @@ -1025,7 +1025,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) if (produce_dep_file) { unlink(output_dep); /* only make a hardlink if the cache file is uncompressed */ - if (getenv("CCACHE_HARDLINK") && test_if_compressed(cached_dep) == 0) { + if (getenv("CCACHE_HARDLINK") && file_is_compressed(cached_dep) == 0) { ret = link(cached_dep, output_dep); } else { ret = copy_file(cached_dep, output_dep, 0); diff --git a/ccache.h b/ccache.h index eb6b282eb..9643b6c56 100644 --- a/ccache.h +++ b/ccache.h @@ -106,7 +106,7 @@ int copy_file(const char *src, const char *dest, int compress_dest); int move_file(const char *src, const char *dest, int compress_dest); int move_uncompressed_file(const char *src, const char *dest, int compress_dest); -bool test_if_compressed(const char *filename); +bool file_is_compressed(const char *filename); int create_dir(const char *dir); const char *get_hostname(void); diff --git a/util.c b/util.c index 1cf919260..ff6ff1517 100644 --- a/util.c +++ b/util.c @@ -333,7 +333,7 @@ move_uncompressed_file(const char *src, const char *dest, int compress_dest) /* test if a file is zlib compressed */ bool -test_if_compressed(const char *filename) +file_is_compressed(const char *filename) { FILE *f;