]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Remove redundant code
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 14 Jul 2012 20:07:32 +0000 (22:07 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 14 Jul 2012 20:07:32 +0000 (22:07 +0200)
util.c

diff --git a/util.c b/util.c
index ed884d100b0f985b36493bcf33a3aac63bdbb8d2..cd47909a9cd2e1458d957e805f407c5fd5084c44 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1274,14 +1274,6 @@ x_readlink(const char *path)
        long maxlen = path_max(path);
        ssize_t len;
        char *buf;
-#ifdef PATH_MAX
-       maxlen = PATH_MAX;
-#elif defined(MAXPATHLEN)
-       maxlen = MAXPATHLEN;
-#elif defined(_PC_PATH_MAX)
-       maxlen = pathconf(path, _PC_PATH_MAX);
-#endif
-       if (maxlen < 4096) maxlen = 4096;
 
        buf = x_malloc(maxlen);
        len = readlink(path, buf, maxlen-1);
@@ -1318,7 +1310,6 @@ read_file(const char *path, size_t size_hint, char **data, size_t *size)
        }
        allocated = size_hint;
        *data = x_malloc(allocated);
-       ret = 0;
        while (true) {
                if (pos > allocated / 2) {
                        allocated *= 2;