diff options
author | Jun T <takimoto-j@kba.biglobe.ne.jp> | 2014-05-18 22:03:35 +0900 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2014-05-18 18:23:16 +0100 |
commit | d082827c8326706e734b20981b4a4d986e0d54ff (patch) | |
tree | 8510ef34e2669da9131dc3fb12457f6f6d9a34bb | |
parent | 3ff598bf4623c5e8dadbdcd95b7fa7e2d7ae1ef6 (diff) | |
download | zsh-d082827c8326706e734b20981b4a4d986e0d54ff.tar.gz zsh-d082827c8326706e734b20981b4a4d986e0d54ff.tar.xz zsh-d082827c8326706e734b20981b4a4d986e0d54ff.zip |
32616: bad printf arguments for limits
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Doc/Zsh/cond.yo | 7 | ||||
-rw-r--r-- | Src/Builtins/rlimits.c | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 8e1c37479..22f6b3cf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-05-18 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * Jun T: 32616: Src/Builtins/rlimits.c: unnecessary printf + argument in limits on some systems. + 2014-05-16 Peter Stephenson <p.stephenson@samsung.com> * 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 |