diff options
author | Mariusz Tkaczyk <mariusz.tkaczyk@intel.com> | 2018-12-11 15:04:07 +0100 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2018-12-11 19:59:44 +0100 |
commit | 757e55435997e355ee9b03e5d913b5496a3c39a8 (patch) | |
tree | d3d16ee613f7b04c5adacbe887a4657784eedaff /policy.c | |
parent | policy.c: prevent NULL pointer referencing (diff) | |
download | mdadm-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |