return CMP(a->type, b->type);
}
-static bool item_compatible(Item *a, Item *b) {
+static bool item_compatible(const Item *a, const Item *b) {
assert(a);
assert(b);
assert(streq(a->path, b->path));
return 0;
}
-static bool is_duplicated_item(ItemArray *existing, Item *i) {
+static bool is_duplicated_item(ItemArray *existing, const Item *i) {
assert(existing);
assert(i);
for (size_t n = 0; n < existing->n_items; n++) {
- Item *e = existing->items + n;
+ const Item *e = existing->items + n;
if (item_compatible(e, i))
continue;