ls: fix segfault-if-standalone-shell, add big fat comment.

This commit is contained in:
Denis Vlasenko
2007-03-19 20:59:20 +00:00
parent 6111a8f2e7
commit 97fd6d81b4
2 changed files with 4 additions and 3 deletions

View File

@@ -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