mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-22 05:00:08 +02:00
util/nvmutil: tidy up check_mac_separator
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -293,11 +293,13 @@ set_mac_byte(int mac_pos, uint64_t *total)
|
|||||||
static void
|
static void
|
||||||
check_mac_separator(int mac_pos)
|
check_mac_separator(int mac_pos)
|
||||||
{
|
{
|
||||||
|
char separator;
|
||||||
|
|
||||||
if (mac_pos == 15)
|
if (mac_pos == 15)
|
||||||
return;
|
return;
|
||||||
char separator = mac[mac_pos + 2];
|
if ((separator = mac[mac_pos + 2]) == ':')
|
||||||
if (separator == ':')
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
err(set_err(EINVAL), "Invalid MAC address separator '%c'", separator);
|
err(set_err(EINVAL), "Invalid MAC address separator '%c'", separator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user