[PATCH] Fix build on hosts that won't allow var = {} initialisation

Volker Lendecke Volker.Lendecke at SerNet.DE
Fri May 24 00:39:40 MDT 2013


On Thu, May 23, 2013 at 05:58:41PM +0200, Christian Ambach wrote:
> On 05/23/2013 07:42 AM, Andrew Bartlett wrote:
> >No, the patch I was proposing is attached.  What you pushed is another
> >patch I was also proposing (I've been busy).
> 
> >-	struct smb_acl_wrapper acl_wrapper = {};
> >+	/* Initialise this to zero, in a portable way */
> >+	struct smb_acl_wrapper acl_wrapper = {
> >+		NULL
> >+	};
> 
> Why not use ZERO_STRUCT (as used elsewhere)?

ZERO_STRUCT is an explicit call to memset. With the
explicit initialization the compiler at least has a chance
to do it differently if it chooses so.

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list