From d082827c8326706e734b20981b4a4d986e0d54ff Mon Sep 17 00:00:00 2001 From: Jun T Date: Sun, 18 May 2014 22:03:35 +0900 Subject: 32616: bad printf arguments for limits --- ChangeLog | 5 +++++ Doc/Zsh/cond.yo | 7 +++++++ Src/Builtins/rlimits.c | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8e1c37479..22f6b3cf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-05-18 Peter Stephenson + + * Jun T: 32616: Src/Builtins/rlimits.c: unnecessary printf + argument in limits on some systems. + 2014-05-16 Peter Stephenson * Roman Neuhauser: users/18827 (plus tweaks to original diff --git a/Doc/Zsh/cond.yo b/Doc/Zsh/cond.yo index 9f8a7d820..26c0eaa58 100644 --- a/Doc/Zsh/cond.yo +++ b/Doc/Zsh/cond.yo @@ -186,6 +186,13 @@ true if either var(exp1) or var(exp2) is true. ) enditem() +For compatibility, if there is a single argument that is not +syntactically significant, typically a variable, the condition is +treated as a test for whether the expression expands as a string of +non-zero length. In other words, tt([[ $var ]]) is the same as tt([[ -n +$var ]]). It is recommended that the second, explicit, form be used +where possible. + Normal shell expansion is performed on the var(file), var(string) and var(pattern) arguments, but the result of each expansion is constrained to be a single word, similar to the effect of double quotes. diff --git a/Src/Builtins/rlimits.c b/Src/Builtins/rlimits.c index fd4c94aaa..0bcafda7f 100644 --- a/Src/Builtins/rlimits.c +++ b/Src/Builtins/rlimits.c @@ -367,7 +367,7 @@ printulimit(char *nam, int lim, int hard, int head) # ifdef HAVE_RLIMIT_SBSIZE case RLIMIT_SBSIZE: if (head) - printf("-b: socket buffer size (bytes) ", RLIMIT_SBSIZE); + printf("-b: socket buffer size (bytes) "); break; # endif /* HAVE_RLIMIT_SBSIZE */ # ifdef HAVE_RLIMIT_PTHREAD -- cgit 1.4.1