summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sw.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/sw.c b/src/sw.c
index fc253a4..2d44fd3 100644
--- a/src/sw.c
+++ b/src/sw.c
@@ -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);
}