diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-04 00:46:42 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-04 00:46:42 +0000 |
| commit | 3e7148a9b7a8dfd7476a8a96b8748c3e45f89fa2 (patch) | |
| tree | 58e1e740d1f953c94bc14888d246c6c97ee734fc | |
| parent | 53a680c0638c86dc261cbcbf31861b0cb75d0a7a (diff) | |
util/nvmutil: reset macbuf in reset_global_state
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 8a52ab03..527f9a90 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -175,6 +175,8 @@ reset_global_state(void) cmd = NULL; fd = 0; part = 0; + + memset(macbuf, 0, sizeof(macbuf)); } static void @@ -323,8 +325,6 @@ parse_mac_string(void) if (strnlen(mac, 20) != 17) err(EINVAL, "MAC address is the wrong length"); - memset(macbuf, 0, sizeof(macbuf)); - for (mac_pos = 0; mac_pos < 16; mac_pos += 3) set_mac_byte(mac_pos); |
