diff options
author | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-10-15 17:45:32 +0400 |
---|---|---|
committer | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-10-15 17:45:32 +0400 |
commit | a2eec6051f81b272521da3001f52d1e43abde6df (patch) | |
tree | e04993b192fc956e4d0fd28b0f4220fef795348c | |
parent | 6f347ef9dc540aaea025c0575e586817cd85cc8e (diff) |
RESERVE_CONFIG_BUFFER --> bb_common_bufsiz1
-rw-r--r-- | coreutils/date.c | 6 | ||||
-rw-r--r-- | coreutils/realpath.c | 8 | ||||
-rw-r--r-- | procps/pidof.c | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/coreutils/date.c b/coreutils/date.c index 6593df970..e9ec51044 100644 --- a/coreutils/date.c +++ b/coreutils/date.c @@ -282,10 +282,8 @@ int date_main(int argc, char **argv) { /* Print OUTPUT (after ALL that!) */ - RESERVE_CONFIG_BUFFER(t_buff, 201); - strftime(t_buff, 200, date_fmt, &tm_time); - puts(t_buff); - RELEASE_CONFIG_BUFFER(t_buff); + strftime(bb_common_bufsiz1, 200, date_fmt, &tm_time); + puts(bb_common_bufsiz1); } return EXIT_SUCCESS; diff --git a/coreutils/realpath.c b/coreutils/realpath.c index ec98221ad..90402c954 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 diff --git a/procps/pidof.c b/procps/pidof.c index acd2d515f..c142e33c8 100644 --- a/procps/pidof.c +++ b/procps/pidof.c @@ -60,7 +60,7 @@ extern int pidof_main(int argc, char **argv) #if ENABLE_FEATURE_PIDOF_OMIT /* fill omit list. */ { - RESERVE_CONFIG_BUFFER(getppid_str, 32); + char getppid_str[32]; llist_t * omits_p = omits; while (omits_p) { /* are we asked to exclude the parent's process ID? */ @@ -76,8 +76,6 @@ extern int pidof_main(int argc, char **argv) } omits_p = omits_p->link; } - if (ENABLE_FEATURE_CLEAN_UP) - RELEASE_CONFIG_BUFFER(getppid_str); } #endif /* Looks like everything is set to go. */ |