]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/utmp.c: Replace UT_LINESIZE by a NITEMS() calculation
authorAlejandro Colomar <alx@kernel.org>
Sun, 18 Feb 2024 17:36:04 +0000 (18:36 +0100)
committerAlejandro Colomar <alx@kernel.org>
Tue, 20 Feb 2024 17:53:53 +0000 (18:53 +0100)
commit5ff6edf9f29ed8b4f907f05925ad5006826d306b
tree573c075564fd8aca2919e5174500a52f32f75536
parent544709fad3b2dd05f22414c1b70be53e6a3504f1
lib/utmp.c: Replace UT_LINESIZE by a NITEMS() calculation

A difference between 'struct utmp' and 'struct utmpx' is that
the former uses UT_LINESIZE for the size of its array members,
while the latter doesn't have a standard variable to get its
size.  Therefore, we need to get the number of elements in
the array with NITEMS().

Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/utmp.c
src/logoutd.c