]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
util: Fix le128_to_cpu on big-endian
authorJeremy Kerr <jk@codeconstruct.com.au>
Mon, 26 Sep 2022 12:02:31 +0000 (20:02 +0800)
committerJeremy Kerr <jk@codeconstruct.com.au>
Mon, 26 Sep 2022 12:04:11 +0000 (20:04 +0800)
commit2308389a47aeb2a573eca4eb63c494a3723d3c6a
tree37337233da37dcc19d79dffcc7a0b400b4da1237
parent7b2b17b153e7d27ab404c43eafc48d21d47aa437
util: Fix le128_to_cpu on big-endian

We currently have a bug when converting from le128, as we'll overwrite
words that we later need to read.

Also, use an if rather than #ifdef, so the BE case can be compiled.
Turns out we need the ccan headers for this.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
tests/meson.build
util/types.c