valeriyvdovin / rpms / systemd

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