diff options
Diffstat (limited to 'newlib/libc/stdlib/wcstombs.c')
-rw-r--r-- | newlib/libc/stdlib/wcstombs.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/newlib/libc/stdlib/wcstombs.c b/newlib/libc/stdlib/wcstombs.c index c984746c2..f02d4ab1f 100644 --- a/newlib/libc/stdlib/wcstombs.c +++ b/newlib/libc/stdlib/wcstombs.c @@ -60,22 +60,22 @@ _DEFUN (wcstombs, (s, pwcs, n), size_t n) { #ifdef MB_CAPABLE - mbstate_t state; - state.__count = 0; - - return _wcstombs_r (_REENT, s, pwcs, n, &state); + mbstate_t state; + state.__count = 0; + + return _wcstombs_r (_REENT, s, pwcs, n, &state); #else /* not MB_CAPABLE */ - int count = 0; - - if (n != 0) { - do { - if ((*s++ = (char) *pwcs++) == 0) - break; - count++; - } while (--n != 0); - } - - return count; + int count = 0; + + if (n != 0) { + do { + if ((*s++ = (char) *pwcs++) == 0) + break; + count++; + } while (--n != 0); + } + + return count; #endif /* not MB_CAPABLE */ } |