diff options
author | Richard Braun <rbraun@sceen.net> | 2018-01-05 15:38:39 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-01-05 15:38:39 +0100 |
commit | f7e18ccf8b09972c965abd6c55a5986a36c7e52c (patch) | |
tree | 863e9b4c7c7cca63f233d7ea796ebdca847b1397 | |
parent | 45f9258c7fc11e145b5197a076bedf935ace9249 (diff) |
sw: use the SHELL_REGISTER_CMDS macro
-rw-r--r-- | src/sw.c | 10 |
1 files changed, 1 insertions, 9 deletions
@@ -277,19 +277,11 @@ static struct shell_cmd shell_cmds[] = { void sw_setup(void) { - int error; - sw_instance = sw_create(); if (!sw_instance) { panic("sw: error: unable to create stopwatch"); } - for (size_t i = 0; i < ARRAY_SIZE(shell_cmds); i++) { - error = shell_cmd_register(&shell_cmds[i]); - - if (error) { - panic("unable to register shell command"); - } - } + SHELL_REGISTER_CMDS(shell_cmds); } |