From 0c79a9a82e1287f12128f1fff84ec4c9551ad684 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 5 Apr 2023 21:51:06 +0100 Subject: util/nvmutil: minor code cleanup --- util/nvmutil/nvmutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/nvmutil') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 3df32e1d..d4379eec 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; } -- cgit v1.2.1