[igt-dev] [PATCH i-g-t 3/3] runner/settings: Be consistent with empty blacklist

Arkadiusz Hiler arkadiusz.hiler at intel.com
Thu Jun 20 12:29:02 UTC 2019


If provided an empty blacklist let's fail instead of returning a value
of uninitialized variable.

Cc: Oleg Vasilev <oleg.vasilev at intel.com>
Cc: Petri Latvala <petri.latvala at intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
---
 runner/settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/runner/settings.c b/runner/settings.c
index 9920e1a6..8b39c063 100644
--- a/runner/settings.c
+++ b/runner/settings.c
@@ -227,7 +227,7 @@ static bool parse_blacklist(struct regex_list *exclude_regexes,
 	FILE *f;
 	char *line = NULL;
 	size_t line_len = 0;
-	bool status;
+	bool status = false;
 
 	if ((f = fopen(blacklist_filename, "r")) == NULL) {
 		fprintf(stderr, "Cannot open blacklist file %s\n", blacklist_filename);
-- 
2.21.0



More information about the igt-dev mailing list