projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
970470e
)
ash: output: Fix fmtstr return value
author
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 16 Feb 2020 17:06:20 +0000
(18:06 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Sun, 16 Feb 2020 18:14:45 +0000
(19:14 +0100)
Upstream commit:
Date: Sat, 19 May 2018 02:39:44 +0800
output: Fix fmtstr return value
The function fmtstr is meant to return the actual length of output
produced, rather than the untruncated length.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c
patch
|
blob
|
history
diff --git
a/shell/ash.c
b/shell/ash.c
index db7dffc72a6b6044f13e9e4d6c8a62d962111deb..a006a1c261ad714ac364c3b1737c5bf8e0576b20 100644
(file)
--- a/
shell/ash.c
+++ b/
shell/ash.c
@@
-713,7
+713,7
@@
fmtstr(char *outbuf, size_t length, const char *fmt, ...)
ret = vsnprintf(outbuf, length, fmt, ap);
va_end(ap);
INT_ON;
- return ret;
+ return ret
> (int)length ? length : ret
;
}
static void