Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: segfault in strftime



[>workers]

On Feb 26,  4:45pm, Peter Stephenson wrote:
} Subject: Re: segfault in strftime
}
} Vincent Lefevre wrote:
} > Wouldn't it be better to test only errno != 0 ?
} 
} Well, given we're setting it to 0 beforehand that seems reasonable.

That's *probably* safe in this case ... but in general I don't think
so.  The standards make no guarantee about the value of errno in the
case where the library call returns "successfully" (however that may
be defined) -- that is, the implementation is allowed to set errno
to what the next upcoming error *might* be, and is not required to
then clear errno before returning success.



Messages sorted by: Reverse Date, Date, Thread, Author