From 734ada5e94f8bdf8a1f45ec092c741a35d94bf95 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 8 Jul 2019 09:53:49 +1000 Subject: [PATCH] test: fix an always-true check for udev properties Found by coverity Signed-off-by: Peter Hutterer --- test/litest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/litest.c b/test/litest.c index a9ec9a9..76da2c5 100644 --- a/test/litest.c +++ b/test/litest.c @@ -664,7 +664,7 @@ litest_init_device_udev_rules(struct litest_test_device *dev, FILE *f) const struct key_value_str *kv; static int count; - if (!dev->udev_properties) + if (dev->udev_properties[0].key == NULL) return; count++; -- 2.7.4