mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
solid: initialize variables in Solid::Predicate::matches()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
32f73a6c6f
commit
f27719e1f8
1 changed files with 3 additions and 3 deletions
|
@ -220,12 +220,12 @@ bool Solid::Predicate::matches(const Device &device) const
|
||||||
}
|
}
|
||||||
|
|
||||||
if (d->compOperator==Mask) {
|
if (d->compOperator==Mask) {
|
||||||
bool v_ok;
|
bool v_ok = false;
|
||||||
int v = value.toInt(&v_ok);
|
int v = value.toInt(&v_ok);
|
||||||
bool e_ok;
|
bool e_ok = false;
|
||||||
int e = expected.toInt(&e_ok);
|
int e = expected.toInt(&e_ok);
|
||||||
|
|
||||||
return (e_ok && v_ok && (v &e));
|
return (e_ok && v_ok && (v & e));
|
||||||
} else {
|
} else {
|
||||||
return (value == expected);
|
return (value == expected);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue