]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Remove superfluous casts to 'void*'
authorAlejandro Colomar <alx@kernel.org>
Wed, 1 Feb 2023 12:50:48 +0000 (13:50 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 3 Feb 2023 04:03:26 +0000 (22:03 -0600)
Every non-const pointer converts automatically to it.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/groupio.c
lib/pwio.c
lib/sgroupio.c
lib/shadowio.c
libmisc/log.c

index 357a30eb9b0104482f7cf1730d64287a7e7df64d..80b0ff87ee45cd6a13deab198460a1d0b9a24166 100644 (file)
@@ -50,7 +50,7 @@ static const char *group_getname (const void *ent)
 
 static void *group_parse (const char *line)
 {
-       return (void *) sgetgrent (line);
+       return sgetgrent (line);
 }
 
 static int group_put (const void *ent, FILE * file)
index e59b473c0b993ed45cd7e4b53a98c8c0ce321fb2..bbdb998b8bbff5bb5f60ec4e97304884b5f58541 100644 (file)
@@ -42,7 +42,7 @@ static const char *passwd_getname (const void *ent)
 
 static void *passwd_parse (const char *line)
 {
-       return (void *) sgetpwent (line);
+       return sgetpwent (line);
 }
 
 static int passwd_put (const void *ent, FILE * file)
index aa95e116fd6b075437d1535cdbf96ac241aac789..a5dabdfd69908c5723e1f948ab781e190b68f0f0 100644 (file)
@@ -151,7 +151,7 @@ static const char *gshadow_getname (const void *ent)
 
 static void *gshadow_parse (const char *line)
 {
-       return (void *) sgetsgent (line);
+       return sgetsgent (line);
 }
 
 static int gshadow_put (const void *ent, FILE * file)
index 683b6c8169f5bdfd4fbaf713e185f7dded482c18..6a702512dbff34d460775c025417ba2062a4b2f8 100644 (file)
@@ -47,7 +47,7 @@ static const char *shadow_getname (const void *ent)
 
 static void *shadow_parse (const char *line)
 {
-       return (void *) sgetspent (line);
+       return sgetspent (line);
 }
 
 static int shadow_put (const void *ent, FILE * file)
index a220be0d2d601aeef7cbc9321d7791a9db3a1017..c99161e769a1441f6246de9f586f7fa22858cbe4 100644 (file)
@@ -67,7 +67,7 @@ void dolastlog (
         * the way we read the old one in.
         */
 
-       if (read (fd, (void *) &newlog, sizeof newlog) != (ssize_t) sizeof newlog) {
+       if (read (fd, &newlog, sizeof newlog) != (ssize_t) sizeof newlog) {
                memzero (&newlog, sizeof newlog);
        }
        if (NULL != ll) {