]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/, src/: Use fgets_a() instead of its pattern
authorAlejandro Colomar <alx@kernel.org>
Mon, 12 Aug 2024 01:24:48 +0000 (03:24 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Mon, 16 Mar 2026 11:12:58 +0000 (12:12 +0100)
commitf94e256673d7d6256c0e45e470687ea17bf4c753
treee4d52ebfaa0b3eba1d3c582d80ca1cf937b245ba
parentfce315db6d187a2c4cc52a48c00f65a357806fad
lib/, src/: Use fgets_a() instead of its pattern

Except for the updated includes, this patch has been scripted with a
semantic patch:

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

- fgets(a, countof(a), b)
+ fgets_a(a, b)

Applied as:

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

Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
17 files changed:
lib/console.c
lib/fields.c
lib/getdef.c
lib/hushed.c
lib/limits.c
lib/loginprompt.c
lib/port.c
lib/setupenv.c
lib/ttytype.c
lib/tz.c
lib/user_busy.c
src/chgpasswd.c
src/chpasswd.c
src/login_nopam.c
src/newusers.c
src/suauth.c
src/useradd.c