dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone
Blob Blame History Raw
From cee4a7f69d853fcc574241d394edc5bcb91469a5 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Mon, 6 Jun 2022 16:19:16 +0200
Subject: zramctl: fix compiler warning [-Werror=maybe-uninitialized]

Upstream: http://github.com/util-linux/util-linux/commit/8883f037466a5534554d7d9114aceb740295ef20
Addresses: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2109459
Signed-off-by: Karel Zak <kzak@redhat.com>
---
 sys-utils/zramctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c
index 003349fad..64d5fcd81 100644
--- a/sys-utils/zramctl.c
+++ b/sys-utils/zramctl.c
@@ -291,7 +291,7 @@ static struct path_cxt *zram_get_control(void)
 
 static int zram_control_add(struct zram *z)
 {
-	int n;
+	int n = 0;
 	struct path_cxt *ctl;
 
 	if (!zram_has_control(z) || !(ctl = zram_get_control()))
-- 
2.36.1