summaryrefslogtreecommitdiff
path: root/coreutils/ls.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-03-19 20:59:20 +0000
committerDenis Vlasenko2007-03-19 20:59:20 +0000
commit97fd6d81b4f101a32c31c4711fb43d0f5c78c47b (patch)
tree19b05ece7934d71f90b490cff52fdceb39e62f92 /coreutils/ls.c
parent6111a8f2e737fea9147cb3fb21613d32d34788bd (diff)
downloadbusybox-97fd6d81b4f101a32c31c4711fb43d0f5c78c47b.zip
busybox-97fd6d81b4f101a32c31c4711fb43d0f5c78c47b.tar.gz
ls: fix segfault-if-standalone-shell, add big fat comment.
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r--coreutils/ls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 1c1544a..2e68eb8 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -777,6 +777,9 @@ static const unsigned opt_flags[] = {
};
+/* THIS IS A "SAFE" APPLET, main() MAY BE CALLED INTERNALLY FROM SHELL */
+/* BE CAREFUL! */
+
int ls_main(int argc, char **argv);
int ls_main(int argc, char **argv)
{
@@ -797,8 +800,6 @@ int ls_main(int argc, char **argv)
USE_FEATURE_AUTOWIDTH(char *terminal_width_str = NULL;)
USE_FEATURE_LS_COLOR(char *color_opt;)
- setvbuf(stdout, bb_common_bufsiz1, _IOFBF, BUFSIZ);
-
#if ENABLE_FEATURE_LS_TIMESTAMPS
time(&current_time_t);
#endif