summaryrefslogtreecommitdiff
path: root/util/nvmutil/nvmutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvmutil/nvmutil.c')
-rw-r--r--util/nvmutil/nvmutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 93f03d4a..7df4657b 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -412,8 +412,8 @@ set_mac_nib(int mac_pos, int nib)
h = (h & 0xE) | 2; /* local, unicast */
}
- macbuf[byte >> 1] |= (uint16_t)h << ((8 * (byte % 2)) +
- (4 * (nib ^ 1)));
+ macbuf[byte >> 1] |= (uint16_t)h <<
+ (((byte & 1) << 3) + (4 * (nib ^ 1)));
}
static uint8_t