diff --git a/src/chars.c b/src/chars.c index badb1082f2b8b72d392c3c6534f2410f1b6c45e6..4d04d502ca7b699fdf73765f6a618ab11e7e7928 100644 --- a/src/chars.c +++ b/src/chars.c @@ -88,11 +88,6 @@ void mbtowc_reset(void) IGNORE_CALL_RESULT(mbtowc(NULL, NULL, 0)); } -void wctomb_reset(void) -{ - IGNORE_CALL_RESULT(wctomb(NULL, 0)); -} - /* This function is equivalent to isalpha() for multibyte characters. */ bool is_alpha_mbchar(const char *c) { @@ -353,7 +348,7 @@ char *make_mbchar(long chr, int *chr_mb_len) /* Reject invalid Unicode characters. */ if (*chr_mb_len < 0 || !is_valid_unicode((wchar_t)chr)) { - wctomb_reset(); + IGNORE_CALL_RESULT(wctomb(NULL, 0)); *chr_mb_len = 0; } } else