svn commit: r211023 - head/usr.sbin/syslogd

M. Warner Losh imp at
Tue Aug 10 18:03:43 UTC 2010

In message: <20100811.023235.13138059.hrs at>
            Hiroki Sato <hrs at> writes:
: Oliver Fromme <olli at> wrote
:   in <201008101623.o7AGNs7I042679 at>:
: 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.


More information about the svn-src-all mailing list