boot: Simplify object erasure
authorJan Janssen <medhefgo@web.de>
Sat, 7 Jan 2023 21:16:52 +0000 (22:16 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 9 Jan 2023 17:58:54 +0000 (18:58 +0100)
commit3f92dc2fd4070b213e6bc85263a9bef06ec9a486
tree63f4106441053a06868aab1c5a5e6d13c42a4b4f
parentf977356a82822612d82a8b4507b5140a7a6ffc40
boot: Simplify object erasure

This erase_obj() machinery looks like voodoo and creates an awful lot of
noise as soon as we get back to building with -O0. We can do this in a
more simple way by introducing a struct that holds the information we
need on cleanup. When building with optimization enabled, all this gets
inlined and the eraser vanishes.
.github/codeql-queries/UninitializedVariableWithCleanup.ql
src/basic/memory-util.c
src/basic/memory-util.h
src/boot/efi/efi-string.h
src/boot/efi/random-seed.c
src/boot/efi/util.h
src/fundamental/memory-util-fundamental.h [new file with mode: 0644]
src/fundamental/meson.build