]> git.ipfire.org Git - thirdparty/kmod.git/commit
Use explicit ENOMEM when {m,re}alloc fails
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 4 Jun 2025 16:16:25 +0000 (17:16 +0100)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Wed, 11 Jun 2025 13:03:26 +0000 (08:03 -0500)
commitd44eb2ffa4a50b9c5c6a269bcfd7cd946c27b045
treea256765fd9e738089c66c1d069e72384fd8faa64
parent1eeb00f776eb9f78c4ec06f7891ce602cafb619e
Use explicit ENOMEM when {m,re}alloc fails

Currently our codebase has a mix of explicitly using ENOMEM and
propagating the errno... The latter of which is guaranteed to be ENOMEM
as documented in the manual pages.

Consolidate on ENOMEM, both for consistency sake and to remove a few
bytes off our binaries ;-)

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/368
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
libkmod/libkmod-elf.c
libkmod/libkmod-file-xz.c
libkmod/libkmod-file-zlib.c
libkmod/libkmod-file-zstd.c
shared/hash.c
tools/opt.c