This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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: recvfrom patch




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.
Thanks!




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!

Although:
+    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.

Jifl
--
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
http://www.inter-tel.com



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