From: Joel Rosdahl Date: Thu, 26 Aug 2010 18:40:28 +0000 (+0200) Subject: Rename read_file() to read_text_file() X-Git-Tag: v3.1~52 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4ac86e614b7827c6a87037db3ea200fb7b4a3fd4;p=thirdparty%2Fccache.git Rename read_file() to read_text_file() --- diff --git a/ccache.h b/ccache.h index a822d1a7c..449acda32 100644 --- a/ccache.h +++ b/ccache.h @@ -148,7 +148,7 @@ void *x_fmmap(const char *fname, off_t *size, const char *errstr); int x_munmap(void *addr, size_t length); int x_rename(const char *oldpath, const char *newpath); char *x_readlink(const char *path); -char *read_file(const char *path); +char *read_text_file(const char *path); /* ------------------------------------------------------------------------- */ /* stats.c */ diff --git a/stats.c b/stats.c index 49a5f4255..faa285ecf 100644 --- a/stats.c +++ b/stats.c @@ -177,7 +177,7 @@ stats_update_size(enum stats stat, size_t size, unsigned files) void stats_read(const char *sfile, struct counters *counters) { - char *data = read_file(sfile); + char *data = read_text_file(sfile); if (data) { parse_stats(counters, data); } else { diff --git a/test/util.h b/test/util.h index 2607f7879..d4afb115a 100644 --- a/test/util.h +++ b/test/util.h @@ -4,6 +4,5 @@ int path_exists(const char *path); int is_symlink(const char *path); void create_file(const char *path, const char *content); -char *read_file(const char *path); #endif diff --git a/util.c b/util.c index d11331bc2..62107be37 100644 --- a/util.c +++ b/util.c @@ -1160,7 +1160,7 @@ x_readlink(const char *path) /* Return the content of a text file, or NULL on error. Caller frees. */ char * -read_file(const char *path) +read_text_file(const char *path) { int fd, ret; size_t pos = 0, allocated = 1024;