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 <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-02-18 11:09:31 +01:00
parent 36c67e033e
commit 061e26d06d
1 changed files with 1 additions and 1 deletions

View File

@ -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++) {