From 1f6f1669cf693faf422b28bda396c4ed72fe44a9 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Wed, 1 Feb 2023 13:50:48 +0100 Subject: [PATCH] Remove superfluous casts to 'void*' Every non-const pointer converts automatically to it. Signed-off-by: Alejandro Colomar --- lib/groupio.c | 2 +- lib/pwio.c | 2 +- lib/sgroupio.c | 2 +- lib/shadowio.c | 2 +- libmisc/log.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/groupio.c b/lib/groupio.c index 357a30eb..80b0ff87 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 e59b473c..bbdb998b 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 aa95e116..a5dabdfd 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 683b6c81..6a702512 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 a220be0d..c99161e7 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) {