svn commit: trunk/busybox: coreutils procps
vodz at busybox.net
vodz at busybox.net
Sat Oct 15 13:45:34 UTC 2005
Author: vodz
Date: 2005-10-15 06:45:32 -0700 (Sat, 15 Oct 2005)
New Revision: 11868
Log:
RESERVE_CONFIG_BUFFER --> bb_common_bufsiz1
Modified:
trunk/busybox/coreutils/date.c
trunk/busybox/coreutils/realpath.c
trunk/busybox/procps/pidof.c
Changeset:
Modified: trunk/busybox/coreutils/date.c
===================================================================
--- trunk/busybox/coreutils/date.c 2005-10-15 10:23:55 UTC (rev 11867)
+++ trunk/busybox/coreutils/date.c 2005-10-15 13:45:32 UTC (rev 11868)
@@ -282,10 +282,8 @@
{
/* 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;
Modified: trunk/busybox/coreutils/realpath.c
===================================================================
--- trunk/busybox/coreutils/realpath.c 2005-10-15 10:23:55 UTC (rev 11867)
+++ trunk/busybox/coreutils/realpath.c 2005-10-15 13:45:32 UTC (rev 11868)
@@ -30,7 +30,13 @@
{
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 @@
}
} while (--argc);
-#ifdef CONFIG_FEATURE_CLEAN_UP
+#if ENABLE_FEATURE_CLEAN_UP && resolved_path_MUST_FREE
RELEASE_CONFIG_BUFFER(resolved_path);
#endif
Modified: trunk/busybox/procps/pidof.c
===================================================================
--- trunk/busybox/procps/pidof.c 2005-10-15 10:23:55 UTC (rev 11867)
+++ trunk/busybox/procps/pidof.c 2005-10-15 13:45:32 UTC (rev 11868)
@@ -60,7 +60,7 @@
#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 @@
}
omits_p = omits_p->link;
}
- if (ENABLE_FEATURE_CLEAN_UP)
- RELEASE_CONFIG_BUFFER(getppid_str);
}
#endif
/* Looks like everything is set to go. */
More information about the busybox-cvs
mailing list