diff options
author | Rob Landley <rob@landley.net> | 2019-04-16 16:53:27 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-04-16 16:53:27 -0500 |
commit | 2a1f89e5d941a77e8c93ad0a5fe78229a4207d61 (patch) | |
tree | f54c6364e70eafb604bff6e078728e6faf66a57d /toys/posix/echo.c | |
parent | 63a0e7afff271ac1b1df3309bbf35f52e4771419 (diff) | |
download | toybox-2a1f89e5d941a77e8c93ad0a5fe78229a4207d61.tar.gz |
Add argument to xflush() so it can test for stdout err without flushing.
Diffstat (limited to 'toys/posix/echo.c')
-rw-r--r-- | toys/posix/echo.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/toys/posix/echo.c b/toys/posix/echo.c index 639f87ab..63eb1981 100644 --- a/toys/posix/echo.c +++ b/toys/posix/echo.c @@ -65,7 +65,7 @@ void echo_main(void) int slash = *(c++), n = unescape(slash); if (n) out = n; - else if (slash=='c') goto done; + else if (slash=='c') return; else if (slash=='0') { out = 0; while (*c>='0' && *c<='7' && n++<3) out = (out*8)+*(c++)-'0'; @@ -90,6 +90,4 @@ void echo_main(void) // Output "\n" if no -n if (!(toys.optflags&FLAG_n)) putchar('\n'); -done: - xflush(); } |