aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/date.c6
-rw-r--r--coreutils/realpath.c8
2 files changed, 9 insertions, 5 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