From: Andreas G. <an...@gr...> - 2020-11-30 19:44:30
|
On Mon, Nov 30, 2020 at 07:56:36PM +0100, Oswald Buddenhagen wrote: > On Mon, Nov 30, 2020 at 07:31:20PM +0100, Andreas Grapentin wrote: > > On Sun, Nov 29, 2020 at 07:30:44PM +0100, Oswald Buddenhagen wrote: > > > On Sun, Nov 29, 2020 at 05:37:43PM +0100, Andreas Grapentin wrote: > > > > + errno = 0; > > > > that's unnecessary - the next error would overwrite it anyway, and > > > no sane > > > code would rely on this being zero without resetting it immediately before. > > > > I don't like letting the state of errno leak to later code, if the > > reported error has been handled. this can lead to unexpected output in > > error reporting code in unrelated issues that don't overwrite errno, > > such as a later call to sys_error. > > > the thing is that this is a fool's errand. errno(3) on linux is rather > explicit about what you should expect. I think there's some minor benefit to this assignment, but if you want it gone, it can go. Updated patch is attached. -A -- ------------------------------------------------------------------------------ my GPG Public Key: https://files.grapentin.org/.gpg/public.key ------------------------------------------------------------------------------ |