]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/, src/: Use !streq() instead of its pattern
authorAlejandro Colomar <alx@kernel.org>
Sun, 24 Nov 2024 17:40:48 +0000 (18:40 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 2 Dec 2024 04:23:19 +0000 (22:23 -0600)
commit9f129146ff86fde5dd73c9ff71b597adcaeb26ef
tree8d28595153c288ed8cd9e1c0a21f6c5e6bb3794a
parent5581e74188e99a1dbe1d3ed4256578a5184cd055
lib/, src/: Use !streq() instead of its pattern

Except for the added (and sorted) includes, and the removal of redundant
parentheses, and one special case, this patch can be approximated with
the following semantic patch:

$ cat ~/tmp/spatch/strneq.sp;
@@
expression a, b;
@@

- strcmp(a, b) != 0
+ !streq(a, b)

@@
expression a, b;
@@

- 0 != strcmp(a, b)
+ !streq(a, b)

$ find contrib/ lib* src/ -type f \
| xargs spatch --sp-file ~/tmp/spatch/strneq.sp --in-place;

Signed-off-by: Alejandro Colomar <alx@kernel.org>
16 files changed:
lib/list.c
lib/salt.c
lib/subordinateio.c
lib/tcbfuncs.c
src/chgpasswd.c
src/chpasswd.c
src/groupmod.c
src/grpck.c
src/grpconv.c
src/newgrp.c
src/newusers.c
src/passwd.c
src/pwck.c
src/su.c
src/useradd.c
src/usermod.c