upstream: Pass a NULL instead of zeroed out va_list from

dollar_expand.  The original intent was in case there's some platform where
va_list is not a pointer equivalent, but on i386 this chokes on the memset.
This unbreaks that build, but will require further consideration.

OpenBSD-Commit-ID: 7b90afcd8e1137a1d863204060052aef415baaf7
This commit is contained in:
dtucker@openbsd.org 2020-05-29 09:02:44 +00:00 committed by Darren Tucker
parent ec1d50b01c
commit f85b118d21

6
misc.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: misc.c,v 1.150 2020/05/29 04:25:40 dtucker Exp $ */
/* $OpenBSD: misc.c,v 1.151 2020/05/29 09:02:44 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005-2020 Damien Miller. All rights reserved.
@ -1212,10 +1212,8 @@ dollar_expand(int *parseerr, const char *string)
{
char *ret;
int err;
va_list ap;
memset(ap, 0, sizeof(ap)); /* unused */
ret = vdollar_percent_expand(&err, 1, 0, string, ap);
ret = vdollar_percent_expand(&err, 1, 0, string, NULL);
if (parseerr != NULL)
*parseerr = err;
return ret;