[ECOS] recvfrom patch

Wade Jensen Wade_Jensen@inter-tel.com
Thu Jan 3 18:19:00 GMT 2002

That's fine.  I was just thinking that the other way MIGHT be slightly faster
because the compiler already has fromlen (which we know is zero) in a register.
Your way is easier to understand though.

Jonathan Larmour <jlarmour@redhat.com> on 01/03/2002 07:04:28 PM

To:   Wade Jensen/Chandler/Inter-Tel@Inter-Tel
cc:   ecos-discuss@sources.redhat.com

Subject:  Re: [ECOS] recvfrom patch

Wade Jensen wrote:
> Hello,
> The recv function calls recvfrom with NULL parameters.  recvfrom then
> dereferences a NULL pointer.  This patch is a simple fix for this.  I have
> tested it a LOT, and it does not seem to have any bad effects.

Thanks for the patch!

+    msg.msg_namelen = fromlen ? *fromlen : (socklen_t)fromlen;

why use (socklen_t)fromlen, i.e. the address of some variable? I've checked
in just:

        msg.msg_namelen = fromlen ? *fromlen : 0;

instead if that's alright.

Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine

Inter-Tel -- Your Connection to the Future

More information about the Ecos-discuss mailing list