From: Alejandro Colomar Date: Wed, 1 Feb 2023 12:50:48 +0000 (+0100) Subject: Remove superfluous casts to 'void*' X-Git-Tag: 4.14.0-rc1~198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f6f1669cf693faf422b28bda396c4ed72fe44a9;p=thirdparty%2Fshadow.git Remove superfluous casts to 'void*' Every non-const pointer converts automatically to it. Signed-off-by: Alejandro Colomar --- diff --git a/lib/groupio.c b/lib/groupio.c index 357a30eb9..80b0ff87e 100644 --- a/lib/groupio.c +++ b/lib/groupio.c @@ -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) diff --git a/lib/pwio.c b/lib/pwio.c index e59b473c0..bbdb998b8 100644 --- a/lib/pwio.c +++ b/lib/pwio.c @@ -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) diff --git a/lib/sgroupio.c b/lib/sgroupio.c index aa95e116f..a5dabdfd6 100644 --- a/lib/sgroupio.c +++ b/lib/sgroupio.c @@ -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) diff --git a/lib/shadowio.c b/lib/shadowio.c index 683b6c816..6a702512d 100644 --- a/lib/shadowio.c +++ b/lib/shadowio.c @@ -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) diff --git a/libmisc/log.c b/libmisc/log.c index a220be0d2..c99161e76 100644 --- a/libmisc/log.c +++ b/libmisc/log.c @@ -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) {