summaryrefslogtreecommitdiff
path: root/util/kconfig
diff options
context:
space:
mode:
authorzbao <fishbaozi@gmail.com>2015-09-26 06:49:47 -0400
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-11-05 02:16:02 +0100
commit91ba80dd798ba09a06282196bcd0bc5e40ec4504 (patch)
tree201f04b83f0ea022599fa34422512a416c7da37e /util/kconfig
parent11bee4019af70e666f14779f298ac2220aec59c3 (diff)
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 <zheng.bao@amd.com> Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/11711 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'util/kconfig')
-rw-r--r--util/kconfig/zconf.l2
-rw-r--r--util/kconfig/zconf.lex.c_shipped2
2 files changed, 2 insertions, 2 deletions
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;
diff --git a/util/kconfig/zconf.lex.c_shipped b/util/kconfig/zconf.lex.c_shipped
index cf05b190c2..72e3a5fca2 100644
--- a/util/kconfig/zconf.lex.c_shipped
+++ b/util/kconfig/zconf.lex.c_shipped
@@ -2417,7 +2417,7 @@ void zconf_nextfile(const char *name)
void zconf_nextfiles(const char *wildcard)
{
- glob_t g;
+ glob_t g = {0};
char **w;
int i;