From 91ba80dd798ba09a06282196bcd0bc5e40ec4504 Mon Sep 17 00:00:00 2001 From: zbao Date: Sat, 26 Sep 2015 06:49:47 -0400 Subject: util/kconfig: fill glob_t with 0 before calling glob On mingw, the function glob has some default options which are not compliant with man page. If gl_offs is not set as 0, there may be some slots which is reserved. If gl_pathc or gl_pathv is not set as 0, the result might be appended to the list instead of being added as new ones. Change-Id: I03110c4cdda70578828d6499262a085a81d26313 Signed-off-by: Zheng Bao Signed-off-by: Zheng Bao Reviewed-on: http://review.coreboot.org/11711 Reviewed-by: Patrick Georgi Tested-by: build bot (Jenkins) --- util/kconfig/zconf.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/kconfig/zconf.l') diff --git a/util/kconfig/zconf.l b/util/kconfig/zconf.l index b6bed02131..0b45c19db9 100644 --- a/util/kconfig/zconf.l +++ b/util/kconfig/zconf.l @@ -339,7 +339,7 @@ void zconf_nextfile(const char *name) void zconf_nextfiles(const char *wildcard) { - glob_t g; + glob_t g = {0}; char **w; int i; -- cgit v1.2.3