summaryrefslogtreecommitdiff
path: root/coreutils/realpath.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik"2005-10-15 13:45:32 +0000
committer"Vladimir N. Oleynik"2005-10-15 13:45:32 +0000
commita2eec6051f81b272521da3001f52d1e43abde6df (patch)
treee04993b192fc956e4d0fd28b0f4220fef795348c /coreutils/realpath.c
parent6f347ef9dc540aaea025c0575e586817cd85cc8e (diff)
downloadbusybox-a2eec6051f81b272521da3001f52d1e43abde6df.zip
busybox-a2eec6051f81b272521da3001f52d1e43abde6df.tar.gz
RESERVE_CONFIG_BUFFER --> bb_common_bufsiz1
Diffstat (limited to 'coreutils/realpath.c')
-rw-r--r--coreutils/realpath.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/coreutils/realpath.c b/coreutils/realpath.c
index ec98221..90402c9 100644
--- a/coreutils/realpath.c
+++ b/coreutils/realpath.c
@@ -30,7 +30,13 @@ int realpath_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
+#if PATH_MAX > (BUFSIZ+1)
RESERVE_CONFIG_BUFFER(resolved_path, PATH_MAX);
+# define resolved_path_MUST_FREE 1
+#else
+#define resolved_path bb_common_bufsiz1
+# define resolved_path_MUST_FREE 0
+#endif
if (--argc == 0) {
bb_show_usage();
@@ -46,7 +52,7 @@ int realpath_main(int argc, char **argv)
}
} while (--argc);
-#ifdef CONFIG_FEATURE_CLEAN_UP
+#if ENABLE_FEATURE_CLEAN_UP && resolved_path_MUST_FREE
RELEASE_CONFIG_BUFFER(resolved_path);
#endif