summaryrefslogtreecommitdiffstats
path: root/policy.c
diff options
context:
space:
mode:
authorMariusz Tkaczyk <mariusz.tkaczyk@intel.com>2018-12-11 15:04:07 +0100
committerJes Sorensen <jsorensen@fb.com>2018-12-11 19:59:44 +0100
commit757e55435997e355ee9b03e5d913b5496a3c39a8 (patch)
treed3d16ee613f7b04c5adacbe887a4657784eedaff /policy.c
parentpolicy.c: prevent NULL pointer referencing (diff)
downloadmdadm-757e55435997e355ee9b03e5d913b5496a3c39a8.tar.xz
mdadm-757e55435997e355ee9b03e5d913b5496a3c39a8.zip
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>
Diffstat (limited to 'policy.c')
-rw-r--r--policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/policy.c b/policy.c
index e3a0671f..3c53bd35 100644
--- a/policy.c
+++ b/policy.c
@@ -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;