Commit 631830c6 authored by Daniel Salzman's avatar Daniel Salzman

Merge branch 'ppc-confdb-fix' into 'master'

fix problem in confdb on big ednian PowerPC

See merge request !429
parents 20696e4b 6c2a07b6
......@@ -417,8 +417,9 @@ void conf_db_val(
}
assert(val->blob != NULL);
memcpy(&val->len, val->blob, sizeof(uint16_t));
val->len = le16toh(val->len);
uint16_t len;
memcpy(&len, val->blob, sizeof(uint16_t));
val->len = le16toh(len);
val->data = val->blob + sizeof(uint16_t);
val->code = KNOT_EOK;
} else {
......@@ -452,8 +453,9 @@ void conf_db_val_next(
if (val->data + val->len < val->blob + val->blob_len) {
val->data += val->len;
memcpy(&val->len, val->data, sizeof(uint16_t));
val->len = le16toh(val->len);
uint16_t len;
memcpy(&len, val->data, sizeof(uint16_t));
val->len = le16toh(len);
val->data += sizeof(uint16_t);
val->code = KNOT_EOK;
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment