X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fhardlink.c;h=b32309fd407735a262759de7c3a2131b49815082;hb=cfc2cfc859a047e24d002aa149f73d45d4979d24;hp=ba4f2e165ce45d0b87a56572b638818fe6a72203;hpb=b0b65688a9fb875e464457ee6449b8793f0f8a03;p=wimlib diff --git a/src/hardlink.c b/src/hardlink.c index ba4f2e16..b32309fd 100644 --- a/src/hardlink.c +++ b/src/hardlink.c @@ -220,9 +220,8 @@ static bool dentries_have_same_ads(const struct dentry *d1, if (strcmp(d1->ads_entries[i].stream_name_utf8, d2->ads_entries[i].stream_name_utf8) != 0) return false; - if (memcmp(d1->ads_entries[i].hash, - d2->ads_entries[i].hash, - WIM_HASH_SIZE) != 0) + if (!hashes_equal(d1->ads_entries[i].hash, + d2->ads_entries[i].hash)) return false; } return true; @@ -247,7 +246,7 @@ static int share_dentry_ads(struct dentry *owner, struct dentry *user) mismatch_type = "security ID"; goto mismatch; } - if (memcmp(owner->hash, user->hash, WIM_HASH_SIZE) != 0) { + if (!hashes_equal(owner->hash, user->hash)) { mismatch_type = "main file resource"; goto mismatch; }