policy.c: Fix for compiler error
After cd72f9d(policy: support devices with multiple paths.) compilation on old compilers fails because "‘p’ may be used uninitialized in this function". Initialize it with NULL to prevent this. Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
parent
467e6a1b4e
commit
757e554359
2
policy.c
2
policy.c
|
@ -268,7 +268,7 @@ static int pol_match(struct rule *rule, char **paths, char *type, char **part)
|
||||||
|
|
||||||
for (; rule; rule = rule->next) {
|
for (; rule; rule = rule->next) {
|
||||||
if (rule->name == rule_path) {
|
if (rule->name == rule_path) {
|
||||||
char *p;
|
char *p = NULL;
|
||||||
int i;
|
int i;
|
||||||
if (pathok == 0)
|
if (pathok == 0)
|
||||||
pathok = -1;
|
pathok = -1;
|
||||||
|
|
Loading…
Reference in New Issue