+/*
+ * Copyright (C) 2012 Eric Biggers
+ *
+ * This file is part of wimlib, a library for working with WIM files.
+ *
+ * wimlib is free software; you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * wimlib is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with wimlib; if not, see http://www.gnu.org/licenses/.
+ */
+
#include "wimlib_internal.h"
#include "dentry.h"
#include "list.h"
* we keep a linked list of the single dentries, and assign them hard link group
* IDs later.
*/
-int link_group_table_insert(struct dentry *dentry, struct link_group_table *table)
+int link_group_table_insert(struct dentry *dentry, void *__table)
{
+ struct link_group_table *table = __table;
size_t pos;
struct link_group *group;
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;
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;
}