shadow/src
Alejandro Colomar bddcd9b095 Remove superfluous casts
-  Every non-const pointer converts automatically to void *.
-  Every pointer converts automatically to void *.
-  void * converts to any other pointer.
-  const void * converts to any other const pointer.
-  Integer variables convert to each other.

I changed the declaration of a few variables in order to allow removing
a cast.

However, I didn't attempt to edit casts inside comparisons, since they
are very delicate.  I also kept casts in variadic functions, since they
are necessary, and in allocation functions, because I have other plans
for them.

I also changed a few casts to int that are better as ptrdiff_t.

This change has triggered some warnings about const correctness issues,
which have also been fixed in this patch (see for example src/login.c).

Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-02-09 10:03:03 -06:00
..
.gitignore getsubids: system binary for user's sub*ids 2021-11-17 16:35:50 +01:00
.indent.pro [svn-upgrade] Integrating new upstream version, shadow (4.0.8) 2007-10-07 11:46:07 +00:00
Makefile.am Supporting vendor given -shells- configuration file 2023-01-26 22:45:32 -06:00
chage.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
check_subid_range.c Make shadow_logfd and Prog not extern 2021-12-23 15:18:07 -06:00
chfn.c Use the noreturn attribute, rather than comments 2023-02-08 22:01:01 -06:00
chgpasswd.c Use the noreturn attribute, rather than comments 2023-02-08 22:01:01 -06:00
chpasswd.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
chsh.c Use the noreturn attribute, rather than comments 2023-02-08 22:01:01 -06:00
expiry.c Use the noreturn attribute, rather than comments 2023-02-08 22:01:01 -06:00
faillog.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
free_subid_range.c Declare file local functions static 2022-01-03 15:09:17 +01:00
get_subid_owners.c Declare file local functions static 2022-01-03 15:09:17 +01:00
getsubids.c Declare file local functions static 2022-01-03 15:09:17 +01:00
gpasswd.c Call NULL by its name 2023-02-02 13:08:30 -06:00
groupadd.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
groupdel.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
groupmems.c Use the noreturn attribute, rather than comments 2023-02-08 22:01:01 -06:00
groupmod.c Call NULL by its name 2023-02-02 13:08:30 -06:00
groups.c Merge pull request #451 from hallyn/2021-12-05/license 2022-01-02 18:38:42 -06:00
grpck.c Use the noreturn attribute, rather than comments 2023-02-08 22:01:01 -06:00
grpconv.c Merge pull request #451 from hallyn/2021-12-05/license 2022-01-02 18:38:42 -06:00
grpunconv.c Merge pull request #451 from hallyn/2021-12-05/license 2022-01-02 18:38:42 -06:00
id.c Merge pull request #451 from hallyn/2021-12-05/license 2022-01-02 18:38:42 -06:00
lastlog.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
login.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
login_nopam.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
logoutd.c Cosmetic fixes 2022-12-22 10:31:43 +01:00
new_subid_range.c Declare file local functions static 2022-01-03 15:09:17 +01:00
newgidmap.c Avoid comparisons of different signs 2023-01-25 12:31:17 +01:00
newgrp.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
newuidmap.c Avoid comparisons of different signs 2023-01-25 12:31:17 +01:00
newusers.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
nologin.c Update licensing info 2021-12-23 19:36:50 -06:00
passwd.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
pwck.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
pwconv.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
pwunconv.c Merge pull request #451 from hallyn/2021-12-05/license 2022-01-02 18:38:42 -06:00
su.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
suauth.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
sulogin.c Call NULL by its name 2023-02-02 13:08:30 -06:00
useradd.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
userdel.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
usermod.c Remove superfluous casts 2023-02-09 10:03:03 -06:00
vipw.c Remove redeclared variable 2022-05-24 07:49:11 -05:00