]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: remove getdelim() buffer null check
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 7 May 2025 17:46:55 +0000 (18:46 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 20 May 2025 02:51:44 +0000 (21:51 -0500)
commitc8b69b77ccb43c24e6399f756e803df002f91aaf
tree4cc3ebf35fc5fad76482d10be1061b4424905a70
parente0f6a6eab86f99dfc3d33f488b5647af0d8ddeb9
libkmod: remove getdelim() buffer null check

As per the manual getdelim(3):
   The buffer is null-terminated and ...

Remove the local check and inline the function call. As a nice result,
we no longer set the errno and the context of feof() is obvious.

Reference: https://github.com/kmod-project/kmod/issues/244
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/346
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-builtin.c