summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-04-05 21:51:06 +0100
committerLeah Rowe <leah@libreboot.org>2023-04-05 21:51:06 +0100
commit0c79a9a82e1287f12128f1fff84ec4c9551ad684 (patch)
treef8a6d6d45fd4aac35dc5e695d1539a441c74ef9e /util
parent8e5a8145b28e0814729b2d58c8a4ced14269a23c (diff)
util/nvmutil: minor code cleanup
Diffstat (limited to 'util')
-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 3df32e1..d4379ee 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -205,7 +205,7 @@ parseMacAddress(const char *strMac, uint16_t *mac)
int i, nib, byte;
uint8_t val8;
uint16_t val16;
- uint64_t total = 0;
+ uint64_t total;
if (strnlen(strMac, 20) != 17)
return -1;
@@ -224,7 +224,7 @@ parseMacAddress(const char *strMac, uint16_t *mac)
val16 = val8;
if ((byte % 2) ^ 1)
- byteswap((uint8_t *) &val16);
+ val16 <<= 8;
val16 <<= 4 * (nib ^ 1);
mac[byte >> 1] |= val16;
}