aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-15 13:45:32 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-15 13:45:32 +0000
commita2eec6051f81b272521da3001f52d1e43abde6df (patch)
treee04993b192fc956e4d0fd28b0f4220fef795348c
parent6f347ef9dc540aaea025c0575e586817cd85cc8e (diff)
downloadbusybox-w32-a2eec6051f81b272521da3001f52d1e43abde6df.tar.gz
busybox-w32-a2eec6051f81b272521da3001f52d1e43abde6df.tar.bz2
busybox-w32-a2eec6051f81b272521da3001f52d1e43abde6df.zip
RESERVE_CONFIG_BUFFER --> bb_common_bufsiz1
-rw-r--r--coreutils/date.c6
-rw-r--r--coreutils/realpath.c8
-rw-r--r--procps/pidof.c4
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)
282 282
283 { 283 {
284 /* Print OUTPUT (after ALL that!) */ 284 /* Print OUTPUT (after ALL that!) */
285 RESERVE_CONFIG_BUFFER(t_buff, 201); 285 strftime(bb_common_bufsiz1, 200, date_fmt, &tm_time);
286 strftime(t_buff, 200, date_fmt, &tm_time); 286 puts(bb_common_bufsiz1);
287 puts(t_buff);
288 RELEASE_CONFIG_BUFFER(t_buff);
289 } 287 }
290 288
291 return EXIT_SUCCESS; 289 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)
30{ 30{
31 int retval = EXIT_SUCCESS; 31 int retval = EXIT_SUCCESS;
32 32
33#if PATH_MAX > (BUFSIZ+1)
33 RESERVE_CONFIG_BUFFER(resolved_path, PATH_MAX); 34 RESERVE_CONFIG_BUFFER(resolved_path, PATH_MAX);
35# define resolved_path_MUST_FREE 1
36#else
37#define resolved_path bb_common_bufsiz1
38# define resolved_path_MUST_FREE 0
39#endif
34 40
35 if (--argc == 0) { 41 if (--argc == 0) {
36 bb_show_usage(); 42 bb_show_usage();
@@ -46,7 +52,7 @@ int realpath_main(int argc, char **argv)
46 } 52 }
47 } while (--argc); 53 } while (--argc);
48 54
49#ifdef CONFIG_FEATURE_CLEAN_UP 55#if ENABLE_FEATURE_CLEAN_UP && resolved_path_MUST_FREE
50 RELEASE_CONFIG_BUFFER(resolved_path); 56 RELEASE_CONFIG_BUFFER(resolved_path);
51#endif 57#endif
52 58
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)
60#if ENABLE_FEATURE_PIDOF_OMIT 60#if ENABLE_FEATURE_PIDOF_OMIT
61 /* fill omit list. */ 61 /* fill omit list. */
62 { 62 {
63 RESERVE_CONFIG_BUFFER(getppid_str, 32); 63 char getppid_str[32];
64 llist_t * omits_p = omits; 64 llist_t * omits_p = omits;
65 while (omits_p) { 65 while (omits_p) {
66 /* are we asked to exclude the parent's process ID? */ 66 /* are we asked to exclude the parent's process ID? */
@@ -76,8 +76,6 @@ extern int pidof_main(int argc, char **argv)
76 } 76 }
77 omits_p = omits_p->link; 77 omits_p = omits_p->link;
78 } 78 }
79 if (ENABLE_FEATURE_CLEAN_UP)
80 RELEASE_CONFIG_BUFFER(getppid_str);
81 } 79 }
82#endif 80#endif
83 /* Looks like everything is set to go. */ 81 /* Looks like everything is set to go. */