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:
94feb1c
)
- reuse return code of vsnprintf to avoid pulling in strlen
author
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Wed, 17 Jan 2007 19:46:33 +0000
(19:46 -0000)
committer
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Wed, 17 Jan 2007 19:46:33 +0000
(19:46 -0000)
coreutils/stty.c
patch
|
blob
|
history
diff --git
a/coreutils/stty.c
b/coreutils/stty.c
index 2682e969df8773ddd56882a50f59b29616027ab6..69dee30b3595e5558a51a8b3df44a48b157e2d8e 100644
(file)
--- a/
coreutils/stty.c
+++ b/
coreutils/stty.c
@@
-463,10
+463,10
@@
static void wrapf(const char *message, ...)
int buflen;
va_start(args, message);
- vsnprintf(buf, sizeof(buf), message, args);
+
buflen =
vsnprintf(buf, sizeof(buf), message, args);
va_end(args);
- buflen = strlen(buf);
- if (!buflen) return;
+ /* buflen = strlen(buf); cheaper not to pull in strlen */
+ if (!buflen
/*|| buflen >= sizeof(buf)*/
) return;
if (current_col > 0) {
current_col++;