[openbeosnetteam] Re: Error in util/misc.c

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


Other related posts: