]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-id128: avoid an unnecessary function call in inline helper
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 12 Jun 2022 18:51:41 +0000 (20:51 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 29 Jun 2022 13:41:51 +0000 (15:41 +0200)
commitd0aec7d4daa0670411613de4e9c3cd444a8a216f
treee8f68ae89a236423a368130a4c08edbbbd4a10bc
parenta4d60b3e1c2097c3e23084aed401e3529b138df1
sd-id128: avoid an unnecessary function call in inline helper

When optimizing, the compiler will most likely replace the call to memcmp(),
but at -O0, the code that is emitted builds the call preamble and does the
call. Let's use the same pattern as with sd_id128_is_null() and
sd_id128_is_allf() and avoid the call.
src/systemd/sd-id128.h