[SCM] Samba Shared Repository - branch master updated

Simo simo at samba.org
Thu Apr 17 13:23:13 MDT 2014

On Thu, 2014-04-17 at 19:57 +0200, Günther Deschner wrote:
> +static bool ads_try_connect(ADS_STRUCT *ads, bool gc,
> +                           struct sockaddr_storage *ss)
>  {

FWIW, I think that you should pass around struct sockaddr *, and not
struct socakddr_storage *.
sockaddr_storage is an artifact used to make sure enough space for any
of the available sockaddr types when a sockaddr is allocated, but should
not be used as a pointer type to pass around, when you want to pass
around an unqualified socket addres then 'struct sockaddr *' is the
right one I think. Or even const struct sockaddr *, if you do not intend
to touch it in the called function.


More information about the samba-technical mailing list