From: Zbigniew Jędrzejewski-Szmek Date: Sat, 2 Jul 2022 14:59:32 +0000 (+0200) Subject: Merge pull request #23865 from keszybz/drop-memcpy-call X-Git-Tag: v252-rc1~741 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b3b2e5ad6a99e5089165ec3c9c2b2756ae5503e;p=thirdparty%2Fsystemd.git Merge pull request #23865 from keszybz/drop-memcpy-call sd-id128: avoid an unnecessary function call in inline helper --- 7b3b2e5ad6a99e5089165ec3c9c2b2756ae5503e diff --cc src/systemd/sd-id128.h index 92682166d76,2aa41623cef..3303c374cee --- a/src/systemd/sd-id128.h +++ b/src/systemd/sd-id128.h @@@ -116,11 -116,9 +116,11 @@@ int sd_id128_get_boot_app_specific(sd_i #a #b #c #d "-" #e #f "-" #g #h "-" #i #j "-" #k #l #m #n #o #p _sd_pure_ static __inline__ int sd_id128_equal(sd_id128_t a, sd_id128_t b) { - return memcmp(&a, &b, 16) == 0; + return a.qwords[0] == b.qwords[0] && a.qwords[1] == b.qwords[1]; } +int sd_id128_string_equal(const char *s, sd_id128_t id); + _sd_pure_ static __inline__ int sd_id128_is_null(sd_id128_t a) { return a.qwords[0] == 0 && a.qwords[1] == 0; }