mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-12 22:30:12 +00:00
(process_block): (process_block): Save errno value from iconv call.
This commit is contained in:
parent
f6bb03c4f7
commit
23402ab9b6
@ -319,6 +319,8 @@ process_block (iconv_t cd, const char *addr, size_t len, FILE *output)
|
||||
if (outptr != outbuf)
|
||||
{
|
||||
/* We have something to write out. */
|
||||
int errno_save = errno;
|
||||
|
||||
if (fwrite (outbuf, 1, outptr - outbuf, output) < outptr - outbuf
|
||||
|| ferror (output))
|
||||
{
|
||||
@ -327,6 +329,8 @@ process_block (iconv_t cd, const char *addr, size_t len, FILE *output)
|
||||
conversion stopped due to problem in writing the output"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
errno = errno_save;
|
||||
}
|
||||
|
||||
if (n != (size_t) -1)
|
||||
|
Loading…
Reference in New Issue
Block a user