In message <[email protected]>, "M. Warner Los
h" writes:
>In message: <[email protected]>
>            Hiroki Sato <[email protected]> writes:
>: Oliver Fromme <[email protected]> wrote
>:   in <[email protected]>:
>: 
>: ol> -static int      validate(struct sockaddr *, const char *);
>: ol> -static void     unmapped(struct sockaddr *);
>: ol> +static int      validate(struct sockaddr_storage *, const char *);
>: ol> +static void     unmapped(struct sockaddr_storage *);
>: 
>:  Why is s/struct sockaddr */struct sockaddr_storage */ needed here?
>:  Using (struct sockaddr *) as an argument looks reasonable to me since
>:  the struct sockaddr_storage is mostly for memory allocation, not for
>:  access via pointer.
>
>Because struct sockaddr * has a too loose alignment requirement for
>later casting, while sockaddr_storage has the proper alignment.

This is the kind of detail Bruce, Warner and I know, but I bet it
was news to most of you.

Somebody should add it to the relevant manualpages...

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[email protected]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to