From 4ac86e614b7827c6a87037db3ea200fb7b4a3fd4 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Thu, 26 Aug 2010 20:40:28 +0200 Subject: [PATCH] Rename read_file() to read_text_file() --- ccache.h | 2 +- stats.c | 2 +- test/util.h | 1 - util.c | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ccache.h b/ccache.h index a822d1a..449acda 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 49a5f42..faa285e 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 2607f78..d4afb11 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 d11331b..62107be 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;