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:
parent
36c67e033e
commit
061e26d06d
|
@ -295,7 +295,7 @@ done:
|
||||||
static struct rfkill_id rfkill_id_to_type(const char *s)
|
static struct rfkill_id rfkill_id_to_type(const char *s)
|
||||||
{
|
{
|
||||||
const struct rfkill_type_str *p;
|
const struct rfkill_type_str *p;
|
||||||
struct rfkill_id ret;
|
struct rfkill_id ret = { .result = 0 };
|
||||||
|
|
||||||
if (islower(*s)) {
|
if (islower(*s)) {
|
||||||
for (p = rfkill_type_strings; p->name != NULL; p++) {
|
for (p = rfkill_type_strings; p->name != NULL; p++) {
|
||||||
|
|
Loading…
Reference in New Issue