|
|
ffbc92 |
From 8827610e5045b9bce7d2fe24058548f938921ccf Mon Sep 17 00:00:00 2001
|
|
|
ffbc92 |
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
|
|
|
ffbc92 |
Date: Mon, 3 May 2021 17:11:22 +0200
|
|
|
ffbc92 |
Subject: [PATCH] libselinux: drop redundant casts to the same type
|
|
|
ffbc92 |
MIME-Version: 1.0
|
|
|
ffbc92 |
Content-Type: text/plain; charset=UTF-8
|
|
|
ffbc92 |
Content-Transfer-Encoding: 8bit
|
|
|
ffbc92 |
|
|
|
ffbc92 |
Found by clang-tidy.
|
|
|
ffbc92 |
|
|
|
ffbc92 |
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
|
|
|
ffbc92 |
---
|
|
|
ffbc92 |
libselinux/src/audit2why.c | 2 +-
|
|
|
ffbc92 |
libselinux/src/avc_sidtab.c | 2 +-
|
|
|
ffbc92 |
libselinux/src/is_customizable_type.c | 2 +-
|
|
|
ffbc92 |
libselinux/src/selinux_restorecon.c | 2 +-
|
|
|
ffbc92 |
4 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
ffbc92 |
|
|
|
ffbc92 |
diff --git a/libselinux/src/audit2why.c b/libselinux/src/audit2why.c
|
|
|
ffbc92 |
index d56b56eb2a1a..029f874f4702 100644
|
|
|
ffbc92 |
--- a/libselinux/src/audit2why.c
|
|
|
ffbc92 |
+++ b/libselinux/src/audit2why.c
|
|
|
ffbc92 |
@@ -275,7 +275,7 @@ static int __policy_init(const char *init_path)
|
|
|
ffbc92 |
}
|
|
|
ffbc92 |
|
|
|
ffbc92 |
sepol_bool_iterate(avc->handle, avc->policydb,
|
|
|
ffbc92 |
- load_booleans, (void *)NULL);
|
|
|
ffbc92 |
+ load_booleans, NULL);
|
|
|
ffbc92 |
|
|
|
ffbc92 |
/* Initialize the sidtab for subsequent use by sepol_context_to_sid
|
|
|
ffbc92 |
and sepol_compute_av_reason. */
|
|
|
ffbc92 |
diff --git a/libselinux/src/avc_sidtab.c b/libselinux/src/avc_sidtab.c
|
|
|
ffbc92 |
index 8dc875608762..8c81cf65d2ef 100644
|
|
|
ffbc92 |
--- a/libselinux/src/avc_sidtab.c
|
|
|
ffbc92 |
+++ b/libselinux/src/avc_sidtab.c
|
|
|
ffbc92 |
@@ -56,7 +56,7 @@ int sidtab_insert(struct sidtab *s, const char * ctx)
|
|
|
ffbc92 |
rc = -1;
|
|
|
ffbc92 |
goto out;
|
|
|
ffbc92 |
}
|
|
|
ffbc92 |
- newctx = (char *) strdup(ctx);
|
|
|
ffbc92 |
+ newctx = strdup(ctx);
|
|
|
ffbc92 |
if (!newctx) {
|
|
|
ffbc92 |
rc = -1;
|
|
|
ffbc92 |
avc_free(newnode);
|
|
|
ffbc92 |
diff --git a/libselinux/src/is_customizable_type.c b/libselinux/src/is_customizable_type.c
|
|
|
ffbc92 |
index 92876f4d9371..1b17860c3622 100644
|
|
|
ffbc92 |
--- a/libselinux/src/is_customizable_type.c
|
|
|
ffbc92 |
+++ b/libselinux/src/is_customizable_type.c
|
|
|
ffbc92 |
@@ -38,7 +38,7 @@ static int get_customizable_type_list(char *** retlist)
|
|
|
ffbc92 |
while (fgets_unlocked(buf, selinux_page_size, fp)
|
|
|
ffbc92 |
&& i < ctr) {
|
|
|
ffbc92 |
buf[strlen(buf) - 1] = 0;
|
|
|
ffbc92 |
- list[i] = (char *) strdup(buf);
|
|
|
ffbc92 |
+ list[i] = strdup(buf);
|
|
|
ffbc92 |
if (!list[i]) {
|
|
|
ffbc92 |
unsigned int j;
|
|
|
ffbc92 |
for (j = 0; j < i; j++)
|
|
|
ffbc92 |
diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c
|
|
|
ffbc92 |
index 6fb9e1ff486d..999aa924ba32 100644
|
|
|
ffbc92 |
--- a/libselinux/src/selinux_restorecon.c
|
|
|
ffbc92 |
+++ b/libselinux/src/selinux_restorecon.c
|
|
|
ffbc92 |
@@ -1152,7 +1152,7 @@ void selinux_restorecon_set_sehandle(struct selabel_handle *hndl)
|
|
|
ffbc92 |
unsigned char *fc_digest;
|
|
|
ffbc92 |
size_t num_specfiles, fc_digest_len;
|
|
|
ffbc92 |
|
|
|
ffbc92 |
- fc_sehandle = (struct selabel_handle *) hndl;
|
|
|
ffbc92 |
+ fc_sehandle = hndl;
|
|
|
ffbc92 |
if (!fc_sehandle)
|
|
|
ffbc92 |
return;
|
|
|
ffbc92 |
|
|
|
ffbc92 |
--
|
|
|
ffbc92 |
2.32.0
|
|
|
ffbc92 |
|