mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
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.
This commit is contained in:
1 parent
e2c4ed6be3
commit
a7fc8303e9
1 file changed
+6
-6
+6
-6
@@ -434,12 +434,6 @@ static void cmd_error(__code const char *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Sets the management MAC from a "mac <aa:bb:cc:dd:ee:ff>" 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)
|
static uint8_t name_char(uint8_t c)
|
||||||
{
|
{
|
||||||
if (c < 0x20 || c > 0x7e || c == '"' || 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 <aa:bb:cc:dd:ee:ff>" 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)
|
void parse_mac_cmd(void)
|
||||||
{
|
{
|
||||||
if (cmd_words_len == 1) {
|
if (cmd_words_len == 1) {
|
||||||
|
|||||||
Reference in new issue
Block a user