daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
dd65c9
From 75d982344e59e1dd916c214c5ccb6339c5c94254 Mon Sep 17 00:00:00 2001
48aa7f
From: Michal Sekletar <msekleta@redhat.com>
48aa7f
Date: Fri, 25 Aug 2017 13:13:50 +0200
48aa7f
Subject: [PATCH] sysctl: fix uninitialized variable
48aa7f
48aa7f
RHEL-only
48aa7f
48aa7f
Reported-by: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
48aa7f
48aa7f
Resolves: #1485121
48aa7f
---
48aa7f
 src/sysctl/sysctl.c | 2 +-
48aa7f
 1 file changed, 1 insertion(+), 1 deletion(-)
48aa7f
48aa7f
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
c62b8e
index bb2bea7cdf..7fb016ceea 100644
48aa7f
--- a/src/sysctl/sysctl.c
48aa7f
+++ b/src/sysctl/sysctl.c
48aa7f
@@ -91,7 +91,7 @@ static int apply_sysctl(const char *property, const char *value) {
48aa7f
 }
48aa7f
 
48aa7f
 static int apply_all(OrderedHashmap *sysctl_options) {
48aa7f
-        int r;
48aa7f
+        int r = 0;
48aa7f
         char *property, *value;
48aa7f
         Iterator i;
48aa7f