selinux: drop cast to same type
authorChristian Göttsche <cgzones@googlemail.com>
Tue, 25 Jan 2022 14:14:15 +0000 (15:14 +0100)
committerPaul Moore <paul@paul-moore.com>
Wed, 26 Jan 2022 20:25:47 +0000 (15:25 -0500)
Both the lvalue scontextp and rvalue scontext are of the type char*.
Drop the redundant explicit cast not needed since commit 9a59daa03df7
("SELinux: fix sleeping allocation in security_context_to_sid"), where
the type of scontext changed from const char* to char*.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/services.c

index 5a7df45bdab17f5ed20c703025b3579275f54a93..2f8db93e53b29de481adbcc166ed0215cd325b6a 100644 (file)
@@ -1452,7 +1452,7 @@ static int string_to_context_struct(struct policydb *pol,
        /* Parse the security context. */
 
        rc = -EINVAL;
-       scontextp = (char *) scontext;
+       scontextp = scontext;
 
        /* Extract the user. */
        p = scontextp;