From fa4c6203b0211430eaaaaf088ee266b2a995ea6e Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Fri, 6 Sep 2013 10:57:50 -0400 Subject: [PATCH] Fix byte assignment in read_boot_u16(). It helps if you put the bytes in the right order, and the parenthesis around the right things to keep them from being all zero. Signed-off-by: Peter Jones --- src/efibootmgr/efibootmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c index ae73884..a774ee2 100644 --- a/src/efibootmgr/efibootmgr.c +++ b/src/efibootmgr/efibootmgr.c @@ -370,7 +370,7 @@ read_boot_u16(const char *name) if (rc < 0) return rc; - rc = (data[0] & 0xff << 8) | (data[1] & 0xff); + rc = (data[0] & 0xff) | ((data[1] & 0xff) << 8); return rc; } -- 2.11.0