diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-17 10:16:02 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-17 10:16:02 +0100 |
commit | c968e597f55cbb1ac209069b2dea89001a6c0682 (patch) | |
tree | d29c215c90a2427540d3466622b24b51d0a39c86 | |
parent | 293e6baf317290e0574494fc405053d6ed016e52 (diff) | |
download | alsa-driver-build-unstable-c968e597f55cbb1ac209069b2dea89001a6c0682.tar.gz |
Add handling of comments in config to util/mod-deps
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | alsa/utils/mod-deps.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/alsa/utils/mod-deps.c b/alsa/utils/mod-deps.c index b5a06aef7..6e1c3ec52 100644 --- a/alsa/utils/mod-deps.c +++ b/alsa/utils/mod-deps.c @@ -511,6 +511,8 @@ static struct cond * create_cond(char *line) if (word == NULL) nomem(); while (get_word(line, word)) { + if (*word == '#') + goto out; cond = calloc(sizeof(struct cond), 1); if (cond == NULL) nomem(); @@ -568,6 +570,8 @@ static struct cond * create_cond(char *line) if (strcmp(cond->name, "EMPTY")) find_or_create_dep(word); while (get_word(line, word)) { + if (*word == '#') + goto out; if (!strcmp(word, "&&")) cond->type = COND_AND; else if (!strcmp(word, "||")) @@ -588,6 +592,7 @@ static struct cond * create_cond(char *line) break; } } + out: free(word); return first; } |