mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
UBIFS: correct key comparison
The comparison was working, but more by accident than design. Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
This commit is contained in:
parent
625bf371c1
commit
2094c334fd
1 changed files with 2 additions and 2 deletions
|
@ -480,8 +480,8 @@ int ubifs_tnc_read_node(struct ubifs_info *c, struct ubifs_zbranch *zbr,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make sure the key of the read node is correct */
|
/* Make sure the key of the read node is correct */
|
||||||
key_read(c, key, &key1);
|
key_read(c, node + UBIFS_KEY_OFFSET, &key1);
|
||||||
if (memcmp(node + UBIFS_KEY_OFFSET, &key1, c->key_len)) {
|
if (!keys_eq(c, key, &key1)) {
|
||||||
ubifs_err("bad key in node at LEB %d:%d",
|
ubifs_err("bad key in node at LEB %d:%d",
|
||||||
zbr->lnum, zbr->offs);
|
zbr->lnum, zbr->offs);
|
||||||
dbg_tnc("looked for key %s found node's key %s",
|
dbg_tnc("looked for key %s found node's key %s",
|
||||||
|
|
Loading…
Reference in a new issue