]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/utmp.c: ttyname_ra(): Add macro
authorAlejandro Colomar <alx@kernel.org>
Fri, 24 Oct 2025 10:09:55 +0000 (12:09 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Tue, 4 Nov 2025 01:56:30 +0000 (02:56 +0100)
commit9bf3ddc8df3cf8a05af07e53d9777b1dbf222783
treeccb5fdf13ab56306340b313206c92246729214ab
parent5686ab8744563489256c86c3b47df75ed8dee68d
lib/utmp.c: ttyname_ra(): Add macro

And use it instead of its pattern.

This macro enforces correct use of ttyname_r(3) with arrays.

Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/utmp.c