aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-08-03 22:03:03 +0300
committerArnold D. Robbins <arnold@skeeve.com>2014-08-03 22:03:03 +0300
commit9a1a8c22e42af12f5859ef5d159b070f959912e6 (patch)
tree58c6e498d6da5d1ea7b550d2f5a0435f721be3e4
parent831486481c397e13dc164524e54eddbc017fade3 (diff)
downloadegawk-9a1a8c22e42af12f5859ef5d159b070f959912e6.tar.gz
egawk-9a1a8c22e42af12f5859ef5d159b070f959912e6.tar.bz2
egawk-9a1a8c22e42af12f5859ef5d159b070f959912e6.zip
Minor code improvement for sprintf %c.
-rw-r--r--ChangeLog5
-rw-r--r--builtin.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 0072c804..6d7a2dac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-03 Arnold D. Robbins <arnold@skeeve.com>
+
+ * builtin.c (format_tree): Don't need to check return value of
+ wctombr for -2. Thanks to Eli Zaretskii for pointing this out.
+
2014-07-31 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (format_tree): Make %c handling more sane on Windows.
diff --git a/builtin.c b/builtin.c
index 7d314dc5..077575fa 100644
--- a/builtin.c
+++ b/builtin.c
@@ -1081,8 +1081,7 @@ check_pos:
count = wcrtomb(buf, wc, & mbs);
if (count == 0
- || count == (size_t)-1
- || count == (size_t)-2) {
+ || count == (size_t) -1) {
if (do_lint)
lintwarn(
_("[s]printf: value %g is not a valid wide character"),