[openbeosnetteam] Re: Error in util/misc.c
- From: "David Reid" <dreid@xxxxxxxxxxxx>
- To: <openbeosnetteam@xxxxxxxxxxxxx>
- Date: Wed, 20 Mar 2002 15:26:53 -0000
Should be... I'm not sure we even use this function any more...
Which is faster though?
david
> > This is wrong:
> > int compare_sockaddr(struct sockaddr *a, struct sockaddr *b)
> > {
> > if (a->sa_len == 4) /* IPv4 address, basically a uint32 */
> > return (*(a->sa_data) = *(b->sa_data));
> > return memcmp((void*)a->sa_data, (void*)b->sa_data, a->sa_len);
> > }
>
> Why differentiate the IPv4 case at all? A memcmp() should be enough,
> right?
>
> Adios...
> Axel.
>
>
>
>
- References:
- [openbeosnetteam] Re: Error in util/misc.c
- From: Axel =?iso-8859-1?q?D=F6rfler
Other related posts:
- » [openbeosnetteam] Error in util/misc.c
- » [openbeosnetteam] Re: Error in util/misc.c
- » [openbeosnetteam] Re: Error in util/misc.c
- » [openbeosnetteam] Re: Error in util/misc.c
- » [openbeosnetteam] Re: Error in util/misc.c
- » [openbeosnetteam] Re: Error in util/misc.c
- » [openbeosnetteam] Re: Error in util/misc.c
- [openbeosnetteam] Re: Error in util/misc.c
- From: Axel =?iso-8859-1?q?D=F6rfler