[SCM] Samba Shared Repository - branch master updated

Simo simo at samba.org
Fri Apr 18 15:39:04 MDT 2014


On Fri, 2014-04-18 at 10:06 -0700, Jeremy Allison wrote:
> On Thu, Apr 17, 2014 at 03:23:13PM -0400, Simo wrote:
> > 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.
> 
> Yeah but using struct sockaddr_storage *ss here does make
> the patch smaller (as it was already using that internal
> to the function). I'm OK with Günther's change here, if
> we want to tidy that up we should do it with a further
> patch on top which tidies up more things.

Oh I didn't mean to imply that I was *not* ok with the patch and some
revert was needed or anything, but we SHOULD get those tidy ups patches
on top :)

> Just my 2cents :-).

I'll one up with 2 Eurocents,
33% more value for a delicious taste! :-P

Simo.




More information about the samba-technical mailing list