]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Merge pull request #23865 from keszybz/drop-memcpy-call
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 2 Jul 2022 14:59:32 +0000 (16:59 +0200)
committerGitHub <noreply@github.com>
Sat, 2 Jul 2022 14:59:32 +0000 (16:59 +0200)
sd-id128: avoid an unnecessary function call in inline helper

1  2 
src/home/homework-luks.c
src/libsystemd/sd-journal/journal-verify.c
src/systemd/sd-id128.h

Simple merge
index 92682166d76b04504bdf0a1a8fffbe55e609ed77,2aa41623cef05ba485b6c63c03097028a86daa4b..3303c374cee7f744ac6f137fb176d98c618f735a
@@@ -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;
  }