mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
util/nvmutil: clearer macbuff init in set_mac_nib
and 1 does the same thing as mod 2, but it's cleaner. i also now bitshift 3 times instead of times by 8, which again is clearer in purpose. i line breaked after h, to make it clear that all of the next part is being shifted in Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user