[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] Re: iconv made easy
From: |
Paul Eggert |
Subject: |
[bug-gnulib] Re: iconv made easy |
Date: |
Tue, 28 Dec 2004 21:35:53 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Simon Josefsson <address@hidden> writes:
>> Perhaps you should rewrite it to remove have_error, and consistently
>> use the test "save_errno == 0" instead of "!have_error". That will
>> simplify the code a bit.
>
> Is that reliable? I though that errno could be left alone (i.e., left
> as garbage) when a system function succeeds.
errno might be garbage, but save_errno would not be garbage. It would
reliably be zero when the function started, because you would
initialize it to zero; this would take the place of initializing
have_error to 0.
It's a minor point -- it does't affect correctness, just clarity
(and perhaps efficiency, a tad).
> OTOH, the function start out by doing 'errno = 0'.
Yes, that's what I meant, except you'd initialize save_errno instead
of errno.
- [bug-gnulib] Re: iconv made easy, (continued)
- [bug-gnulib] Re: iconv made easy, Simon Josefsson, 2004/12/15
- Re: [bug-gnulib] Re: iconv made easy, Paul Eggert, 2004/12/15
- [bug-gnulib] Re: iconv made easy, Simon Josefsson, 2004/12/15
- [bug-gnulib] Re: iconv made easy, Simon Josefsson, 2004/12/25
- Re: [bug-gnulib] Re: iconv made easy, Paul Eggert, 2004/12/26
- [bug-gnulib] Re: iconv made easy, Simon Josefsson, 2004/12/26
- [bug-gnulib] Re: iconv made easy, Paul Eggert, 2004/12/27
- [bug-gnulib] Re: iconv made easy, Simon Josefsson, 2004/12/27
- [bug-gnulib] Re: iconv made easy, Paul Eggert, 2004/12/28
- [bug-gnulib] Re: iconv made easy, Simon Josefsson, 2004/12/28
- [bug-gnulib] Re: iconv made easy,
Paul Eggert <=