Fwd: eio.c bug - use of errno without testing result

Marc Lehmann schmorp at schmorp.de
Fri Oct 29 06:59:40 CEST 2010


On Fri, Oct 29, 2010 at 10:45:34AM +1100, Micheil Smith <micheil at brandedcode.com> wrote:
> Hi All,
> 
> This was sent to the node.js development list, but looks like it's an
> issue from within libeio.

Could you describe what the issue is?

> > Possible Fix:
> >      case EIO_SENDFILE:  req->result = eio__sendfile (req->int1, req->int2, req->offs, req->size, self);
> >                          if (req->result >= 0) errno = 0; break;

This code snippet looks like a bug, why set errno to zero on success?

-- 
                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\



More information about the libev mailing list