From 4fcf5563154ddf89c5b4858e6da1a348eda6bdcc Mon Sep 17 00:00:00 2001 From: Petri Latvala Date: Wed, 16 Jan 2019 13:20:48 +0200 Subject: lib/igt_kms: Aid static analyzer with the control flow If we first find n amount of ':' in a string, the amount is still n when we walk through it the second time. Signed-off-by: Petri Latvala Cc: Joonas Lahtinen Reviewed-by: Arkadiusz Hiler --- lib/igt_kmod.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/igt_kmod.c') diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c index 22c26021..91662eb3 100644 --- a/lib/igt_kmod.c +++ b/lib/igt_kmod.c @@ -86,6 +86,7 @@ static struct kmod_ctx *kmod_ctx(void) p = config_paths_str; for (i = 0; i < count; ++i) { + igt_assert(p != NULL); config_paths[i] = p; if ((p = strchr(p, ':'))) -- cgit v1.2.3