From 752b2ffed0b2892d4fce25a9f1fb5511862d2e94 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 14 Jul 2012 22:07:32 +0200 Subject: [PATCH] Remove redundant code --- util.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/util.c b/util.c index ed884d100..cd47909a9 100644 --- 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; -- 2.47.3