041eacc63c
Rebase on upstream commit 32611aea6543 See $ cd SELinuxProject/selinux $ git log --pretty=oneline libselinux-3.2..32611aea6543 -- libselinux Related: rhbz#1938789
43 lines
1.2 KiB
Diff
43 lines
1.2 KiB
Diff
From 319429ba3358c32a566f2c59898d01f2f36fdc95 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
|
|
Date: Mon, 3 May 2021 17:10:57 +0200
|
|
Subject: [PATCH] libselinux: exclude_non_seclabel_mounts(): drop unused
|
|
variable
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
The variable `num` is never read from.
|
|
|
|
Found by clang-analyer.
|
|
|
|
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
|
|
---
|
|
libselinux/src/selinux_restorecon.c | 3 +--
|
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
|
diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c
|
|
index 249c361fa988..6fb9e1ff486d 100644
|
|
--- a/libselinux/src/selinux_restorecon.c
|
|
+++ b/libselinux/src/selinux_restorecon.c
|
|
@@ -230,7 +230,6 @@ static int exclude_non_seclabel_mounts(void)
|
|
struct utsname uts;
|
|
FILE *fp;
|
|
size_t len;
|
|
- ssize_t num;
|
|
int index = 0, found = 0, nfile = 0;
|
|
char *mount_info[4];
|
|
char *buf = NULL, *item;
|
|
@@ -245,7 +244,7 @@ static int exclude_non_seclabel_mounts(void)
|
|
if (!fp)
|
|
return 0;
|
|
|
|
- while ((num = getline(&buf, &len, fp)) != -1) {
|
|
+ while (getline(&buf, &len, fp) != -1) {
|
|
found = 0;
|
|
index = 0;
|
|
item = strtok(buf, " ");
|
|
--
|
|
2.32.0
|
|
|