diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-01-17 19:46:33 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2007-01-17 19:46:33 +0000 |
commit | 8eb0549e5dedcc379839e91cec70ddbee0dc8130 (patch) | |
tree | d99f91855a9cd1e17e2d73422a852a6aa1da1518 /coreutils/stty.c | |
parent | 94feb1c8076742c83f569a4e42405a70902066a0 (diff) | |
download | busybox-w32-8eb0549e5dedcc379839e91cec70ddbee0dc8130.tar.gz busybox-w32-8eb0549e5dedcc379839e91cec70ddbee0dc8130.tar.bz2 busybox-w32-8eb0549e5dedcc379839e91cec70ddbee0dc8130.zip |
- reuse return code of vsnprintf to avoid pulling in strlen
Diffstat (limited to 'coreutils/stty.c')
-rw-r--r-- | coreutils/stty.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/coreutils/stty.c b/coreutils/stty.c index 2682e969d..69dee30b3 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -463,10 +463,10 @@ static void wrapf(const char *message, ...) | |||
463 | int buflen; | 463 | int buflen; |
464 | 464 | ||
465 | va_start(args, message); | 465 | va_start(args, message); |
466 | vsnprintf(buf, sizeof(buf), message, args); | 466 | buflen = vsnprintf(buf, sizeof(buf), message, args); |
467 | va_end(args); | 467 | va_end(args); |
468 | buflen = strlen(buf); | 468 | /* buflen = strlen(buf); cheaper not to pull in strlen */ |
469 | if (!buflen) return; | 469 | if (!buflen /*|| buflen >= sizeof(buf)*/) return; |
470 | 470 | ||
471 | if (current_col > 0) { | 471 | if (current_col > 0) { |
472 | current_col++; | 472 | current_col++; |