summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2007-06-08 12:51:55 +0000
committerBernhard Reutner-Fischer2007-06-08 12:51:55 +0000
commitdbb06975a89a0c44c1bf78c739bd921a47fb3d11 (patch)
tree854602065dbdff275a74e208269dbdef975f2509 /coreutils
parentc3eb33731d90559dfe8ed0bc43ab43e24bca96c5 (diff)
downloadbusybox-dbb06975a89a0c44c1bf78c739bd921a47fb3d11.zip
busybox-dbb06975a89a0c44c1bf78c739bd921a47fb3d11.tar.gz
- fix invocation without any argument
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/echo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/echo.c b/coreutils/echo.c
index e1eea00..085e851 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -34,6 +34,8 @@ int bb_echo(char **argv)
nflag = 1, /* 1 -- print '\n' */
};
arg = *++argv;
+ if (!arg)
+ goto newline_ret;
#else
const char *p;
char nflag = 1;
@@ -107,9 +109,7 @@ int bb_echo(char **argv)
putchar(' ');
}
-#if ENABLE_FEATURE_FANCY_ECHO
newline_ret:
-#endif
if (nflag) {
putchar('\n');
}