libselinux: drop redundant casts to the same type

Found by clang-tidy.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
This commit is contained in:
Christian Göttsche 2021-05-03 17:11:22 +02:00 committed by Petr Lautrbach
parent e1999379df
commit 8827610e50
4 changed files with 4 additions and 4 deletions

View file

@ -275,7 +275,7 @@ static int __policy_init(const char *init_path)
}
sepol_bool_iterate(avc->handle, avc->policydb,
load_booleans, (void *)NULL);
load_booleans, NULL);
/* Initialize the sidtab for subsequent use by sepol_context_to_sid
and sepol_compute_av_reason. */

View file

@ -56,7 +56,7 @@ int sidtab_insert(struct sidtab *s, const char * ctx)
rc = -1;
goto out;
}
newctx = (char *) strdup(ctx);
newctx = strdup(ctx);
if (!newctx) {
rc = -1;
avc_free(newnode);

View file

@ -38,7 +38,7 @@ static int get_customizable_type_list(char *** retlist)
while (fgets_unlocked(buf, selinux_page_size, fp)
&& i < ctr) {
buf[strlen(buf) - 1] = 0;
list[i] = (char *) strdup(buf);
list[i] = strdup(buf);
if (!list[i]) {
unsigned int j;
for (j = 0; j < i; j++)

View file

@ -1152,7 +1152,7 @@ void selinux_restorecon_set_sehandle(struct selabel_handle *hndl)
unsigned char *fc_digest;
size_t num_specfiles, fc_digest_len;
fc_sehandle = (struct selabel_handle *) hndl;
fc_sehandle = hndl;
if (!fc_sehandle)
return;