]> git.ipfire.org Git - thirdparty/kmod.git/commit
Use sizeof() over PATH_MAX in snprintf() contexts
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 5 Apr 2025 10:39:42 +0000 (11:39 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Fri, 9 May 2025 18:52:46 +0000 (13:52 -0500)
commit0fd84a53abf5af8621b1fbd420622a85dc3297e4
treedf105ea2a3cee28fd227bc6ece0e4ab54750f5b8
parentc494150668decca294de64c5fb083978c0d7fbc4
Use sizeof() over PATH_MAX in snprintf() contexts

Bunch of our codebase uses sizeof() while the rest hard-coded length for
the destination buffer. Converge on the former since it makes for more
obvious and less error prone code.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/345
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-builtin.c
shared/tmpfile-util.c
tools/depmod.c