util/nvmutil: tidy up check_mac_separator

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-03 15:40:33 +00:00
parent 036ac6dc39
commit d9d628e146
+4 -2
View File
@@ -293,11 +293,13 @@ set_mac_byte(int mac_pos, uint64_t *total)
static void
check_mac_separator(int mac_pos)
{
char separator;
if (mac_pos == 15)
return;
char separator = mac[mac_pos + 2];
if (separator == ':')
if ((separator = mac[mac_pos + 2]) == ':')
return;
err(set_err(EINVAL), "Invalid MAC address separator '%c'", separator);
}