[PATCH] Fix building Samba with GCC 7.1

Jeremy Allison jra at samba.org
Thu Jun 1 17:09:39 UTC 2017


On Thu, Jun 01, 2017 at 11:36:15AM -0400, Jim Brown via samba-technical wrote:
> Shouldn't this test be "short_name != NULL"?
> 
> On 6/1/17 09:45, Andreas Schneider via samba-technical wrote:
> >-	if (*short_name == '\0') {
> >+	if (*short_name[0] == '\0') {
> >  		*short_name = talloc_strdup(mem_ctx, *long_name);
> >  	}

Yes, that should be there in addition to Andreas's change,
but that isn't what Andreas's change is fixing.

Much of this test code is sloppily written without correct
checks for allocation fail on the talloc_XXX() calls.

That's something that would be nice to get done. If
this stuff bothers you I'd happily review patches
to fix this up.

Cheers,

	Jeremy.



More information about the samba-technical mailing list