This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] don't reset errno if no error occured


----- "Paolo Carlini" <paolo.carlini@oracle.com> wrote:
>         errno = 0;
>         do
>           __err = fclose(_M_cfile);
>         while (__err && errno == EINTR);

This code is fine even though the assignment is unnecessary in case the implementation is correct.  As I said, if code breaks because of this extra assignment the caller is broken.

-- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]