From 4d6f80de012e3fe93d841d3933d8f43f3408d326 Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Sat, 20 May 2023 00:13:45 +0300 Subject: [PATCH] liblur: check return value instead of comparing the out_ptr Fixes a clang-analyze warning for a dead assignment. --- src/liblur.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liblur.c b/src/liblur.c index 5b4f1d88..c2ce5831 100644 --- a/src/liblur.c +++ b/src/liblur.c @@ -204,7 +204,7 @@ lur_receiver_enumerate(struct lur_receiver *lur, bool is_new_device = true; rc = hidpp10_device_new(&base, i, HIDPP10_PROFILE_UNKNOWN, 1, &d); - if (!d) + if (rc) continue; rc = hidpp10_get_pairing_information_device_name(d, name, &name_size);