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:
Mariusz Tkaczyk 2018-12-11 15:04:07 +01:00 committed by Jes Sorensen
parent 467e6a1b4e
commit 757e554359
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,7 @@ static int pol_match(struct rule *rule, char **paths, char *type, char **part)
for (; rule; rule = rule->next) {
if (rule->name == rule_path) {
char *p;
char *p = NULL;
int i;
if (pathok == 0)
pathok = -1;