]> git.ipfire.org Git - thirdparty/kmod.git/commit
libkmod: don't set errno in strbuf_to_vector()
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 7 May 2025 13:20:29 +0000 (14:20 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 20 May 2025 02:51:44 +0000 (21:51 -0500)
commite0f6a6eab86f99dfc3d33f488b5647af0d8ddeb9
treec805b1745fb7713f75e4f404129a4be15fe364bc
parent426154c62a14c4d9c65706e9d9732c2d29eab2bc
libkmod: don't set errno in strbuf_to_vector()

The function does bounds checking, allocation and copying. In the first
instance, we manually set errno (to ENOMEM?) on failure. The realloc()
call does the same, implicitly.

In practice we don't distinguish between the two failures, so we might
as well stop manually setting errno and always assume ENOMEM in the
caller.

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