Browse Source

fputwc: call __fputwc directly

Avoid another hop in the call stack.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
topic/3.6
Corinna Vinschen 3 years ago
parent
commit
47f079b98e
  1. 7
      newlib/libc/stdio/fputwc.c
  2. 2
      newlib/libc/stdio/fputwc_u.c

7
newlib/libc/stdio/fputwc.c

@ -181,5 +181,10 @@ fputwc (wchar_t wc,
struct _reent *reent = _REENT;
CHECK_INIT(reent, fp);
return _fputwc_r (reent, wc, fp);
wint_t r;
_newlib_flockfile_start (fp);
r = __fputwc(reent, wc, fp);
_newlib_flockfile_end (fp);
return r;
}

2
newlib/libc/stdio/fputwc_u.c

@ -44,5 +44,5 @@ fputwc_unlocked (wchar_t wc,
struct _reent *reent = _REENT;
CHECK_INIT(reent, fp);
return _fputwc_unlocked_r (reent, wc, fp);
return __fputwc(reent, wc, fp);
}

Loading…
Cancel
Save