From: Mariusz Tkaczyk Date: Tue, 11 Dec 2018 14:04:07 +0000 (+0100) Subject: policy.c: Fix for compiler error X-Git-Tag: mdadm-4.2-rc1~122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=757e55435997e355ee9b03e5d913b5496a3c39a8;p=thirdparty%2Fmdadm.git 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 Signed-off-by: Jes Sorensen --- 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;