From a7fc8303e9e26c17a248128f02f4c234dd63c16b Mon Sep 17 00:00:00 2001 From: d00f <8052722+DrDoof@users.noreply.github.com> Date: Fri, 18 Sep 2026 17:32:54 +0200 Subject: [PATCH] cmd: move name_char() above the parse_mac_cmd comment The helper landed between that comment and the function it describes, so the comment now reads as if it belonged to name_char(). Moving the helper up puts the two back together. The generated code is unchanged. --- cmd_parser.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd_parser.c b/cmd_parser.c index ed973db8..e5032024 100644 --- a/cmd_parser.c +++ b/cmd_parser.c @@ -434,12 +434,6 @@ static void cmd_error(__code const char *msg) } -// Sets the management MAC from a "mac " command (or prints -// the current one with a bare "mac"). Refuses blank/multicast/locally -// administered/all-zero-OUI addresses so the running MAC stays reachable, and -// re-registers the static L2 management entry so the change applies without a -// reboot. As a regular command a "mac ..." line in the startup config applies -// on every boot (execute_config runs before the final static L2 entry). static uint8_t name_char(uint8_t c) { if (c < 0x20 || c > 0x7e || c == '"' || c == '\\') @@ -448,6 +442,12 @@ static uint8_t name_char(uint8_t c) } +// Sets the management MAC from a "mac " command (or prints +// the current one with a bare "mac"). Refuses blank/multicast/locally +// administered/all-zero-OUI addresses so the running MAC stays reachable, and +// re-registers the static L2 management entry so the change applies without a +// reboot. As a regular command a "mac ..." line in the startup config applies +// on every boot (execute_config runs before the final static L2 entry). void parse_mac_cmd(void) { if (cmd_words_len == 1) {