From 061e26d06df54e9ba6fd092b230206e4c3c5e6dc Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 18 Feb 2021 11:09:31 +0100 Subject: [PATCH] rfkill: fix static analyzer warning [coverity scan] >>> CID 365738: Uninitialized variables (UNINIT) >>> Using uninitialized value "ret". Field "ret" is uninitialized. 326 return ret; Signed-off-by: Karel Zak --- sys-utils/rfkill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys-utils/rfkill.c b/sys-utils/rfkill.c index 73fb4bab40..9b134444a9 100644 --- a/sys-utils/rfkill.c +++ b/sys-utils/rfkill.c @@ -295,7 +295,7 @@ done: static struct rfkill_id rfkill_id_to_type(const char *s) { const struct rfkill_type_str *p; - struct rfkill_id ret; + struct rfkill_id ret = { .result = 0 }; if (islower(*s)) { for (p = rfkill_type_strings; p->name != NULL; p++) { -- 2.47.3