Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apfs-label/apfs-label.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ static void omap_node_locate_val(struct apfs_btree_node_phys *node, int index, i
static int omap_keycmp(struct apfs_omap_key *k1, struct apfs_omap_key *k2)
{
if (le64_to_cpu(k1->ok_oid) != le64_to_cpu(k2->ok_oid))
return le64_to_cpu(k1->ok_oid) < le64_to_cpu(k2->ok_oid) ? -1 : 1;
return le64_to_cpu(k1->ok_oid) - le64_to_cpu(k2->ok_oid);
if (le64_to_cpu(k1->ok_xid) != le64_to_cpu(k2->ok_xid))
return le64_to_cpu(k1->ok_xid) < le64_to_cpu(k2->ok_xid) ? -1 : 1;
return le64_to_cpu(k1->ok_xid) - le64_to_cpu(k2->ok_xid);
return 0;
}

Expand Down
6 changes: 3 additions & 3 deletions apfsck/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ void read_free_queue_key(void *raw, int size, struct key *key)
int keycmp(struct key *k1, struct key *k2)
{
if (k1->id != k2->id)
return k1->id < k2->id ? -1 : 1;
return k1->id - k2->id;
if (k1->type != k2->type)
return k1->type < k2->type ? -1 : 1;
return k1->type - k2->type;
if (k1->number != k2->number)
return k1->number < k2->number ? -1 : 1;
return k1->number - k2->number;
if (!k1->name) /* Keys of this type have no name */
return 0;

Expand Down