Blame SOURCES/0011-policy.c-Fix-for-compiler-error.patch

5d5466
From 757e55435997e355ee9b03e5d913b5496a3c39a8 Mon Sep 17 00:00:00 2001
5d5466
From: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
5d5466
Date: Tue, 11 Dec 2018 15:04:07 +0100
5d5466
Subject: [RHEL7.7 PATCH 11/24] policy.c: Fix for compiler error
5d5466
MIME-Version: 1.0
5d5466
Content-Type: text/plain; charset=UTF-8
5d5466
Content-Transfer-Encoding: 8bit
5d5466
5d5466
After cd72f9d(policy: support devices with multiple paths.) compilation
5d5466
on old compilers fails because "ā€˜pā€™ may be used uninitialized
5d5466
in this function".
5d5466
5d5466
Initialize it with NULL to prevent this.
5d5466
5d5466
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@intel.com>
5d5466
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
5d5466
---
5d5466
 policy.c | 2 +-
5d5466
 1 file changed, 1 insertion(+), 1 deletion(-)
5d5466
5d5466
diff --git a/policy.c b/policy.c
5d5466
index e3a0671..3c53bd3 100644
5d5466
--- a/policy.c
5d5466
+++ b/policy.c
5d5466
@@ -268,7 +268,7 @@ static int pol_match(struct rule *rule, char **paths, char *type, char **part)
5d5466
 
5d5466
 	for (; rule; rule = rule->next) {
5d5466
 		if (rule->name == rule_path) {
5d5466
-			char *p;
5d5466
+			char *p = NULL;
5d5466
 			int i;
5d5466
 			if (pathok == 0)
5d5466
 				pathok = -1;
5d5466
-- 
5d5466
2.7.5
5d5466