From 4cf38c1ccd0c41715633c1b724c30e9c235099d1 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Fri, 2 Sep 2016 21:14:39 +0800 Subject: builtin: Fix echo -n early termination The commit 7a784244625d5489c0fc779201c349555dc5f8bc ("[BUILTIN] Simplify echo command") broke echo -n by making it always terminate after printing the first argument. This patch fixes this by only terminating when we have reached the end of the arguments. Fixes: 7a784244625d ("[BUILTIN] Simplify echo command") Reported-by: Luigi Tarenga Signed-off-by: Herbert Xu --- src/bltin/printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/bltin/printf.c b/src/bltin/printf.c index 1112253..a626cee 100644 --- a/src/bltin/printf.c +++ b/src/bltin/printf.c @@ -459,7 +459,7 @@ echocmd(int argc, char **argv) if (likely(*argv)) nonl += print_escape_str("%s", NULL, NULL, *argv++); - if (nonl > 0) + if (likely((nonl + !*argv) > 1)) break; c = *argv ? ' ' : '\n'; -- cgit 1.4.1 'active' href='/pounce/log/Makefile?h=2.5&follow=1'>log tree commit diff
Commit message (Expand)Author
2020-11-16Only allow clients to AUTHENTICATE if using a certJune McEnroe
2020-11-16Set client sockets non-blockingJune McEnroe
2020-11-14Swap localAccept parameter orderJune McEnroe
2020-11-14Only send shutdown QUIT and ERROR to registered clientsJune McEnroe
2020-11-14Make struct Client publicJune McEnroe
2020-11-13Wait for POLLIN to do client tls_handshakeJune McEnroe
2020-11-13Use a fixed size pollfd array in calicoJune McEnroe
2020-11-13Disallow / anywhere in server nameJune McEnroe
2020-11-12Check bounds of ClientHello extensions lengthJune McEnroe
2020-11-10Report paths in unveil errorsJune McEnroe
2020-10-24contrib/palaver: Use open_memstream instead of fmemopenJune McEnroe
2020-10-11Handle signals before the main loopJune McEnroe
2020-09-09Fix possibliy uninitialized error 2.0June McEnroe
2020-08-31Refactor reserialization and client self-producingJune McEnroe
2020-08-30Add chmod+chown to certbot exampleJune McEnroe
2020-08-30Rearrange bounce.c, move non-main mains below mainJune McEnroe
2020-08-30Sandbox pounce with unveil(2)June McEnroe
2020-08-28Refactor certificate loading and load all certs from config pathsJune McEnroe
2020-08-27Sandbox pounce with pledge(2)June McEnroe
2020-08-27Sandbox calico with pledge(2) and unveil(2)June McEnroe
2020-08-27Add support for OpenBSDJune McEnroe
2020-08-27Remove rc scriptsJune McEnroe
2020-08-27contrib/palaver: Fix documented database pathJune McEnroe
2020-08-27contrib/palaver: Remove rc scriptJune McEnroe
2020-08-27contrib/palaver: Fix database search and creationJune McEnroe
2020-08-27contrib/palaver: Use pounce's XDG directoryJune McEnroe
2020-08-27contrib/palaver: Only allow HTTPSJune McEnroe
2020-08-25Support the pounce_env rc variableJune McEnroe
2020-08-25Remove deprecated option namesJune McEnroe
2020-08-25Document configuration and data file searchJune McEnroe
2020-08-24Use dataOpen for save fileJune McEnroe
2020-08-24Use configOpen to load localCAJune McEnroe
2020-08-24Use configPath to load client cert/privJune McEnroe
2020-08-24Use configOpen in getopt_configJune McEnroe
2020-08-24Import xdg.c from catgirlJune McEnroe
2020-08-23Replace “RAND_bytes” by “getentropy”Issam E. Maghni
2020-08-16contrib/palaver: Add no message preview flagsJune McEnroe
2020-08-13contrib/palaver: Don't set channel for PMsJune McEnroe
2020-08-13Fix unintended interception of NICK after registrationJune McEnroe
2020-08-12Add Additional Components section to READMEJune McEnroe
2020-08-12Document -L / palaver optionJune McEnroe
2020-08-11contrib/palaver: Document service configurationJune McEnroe
2020-08-11contrib/palaver: Add install target and rc scriptJune McEnroe
2020-08-11contrib/palaver: Implement command and notificationsJune McEnroe