aboutsummaryrefslogtreecommitdiff
path: root/src/ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctl.c')
-rw-r--r--src/ctl.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ctl.c b/src/ctl.c
index 0e5ea97..489fc7f 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -1878,4 +1878,5 @@ fun_start (struct json_value *result, struct prog *prog)
{
- if (prog->v.p.status == status_disabled)
+ switch (prog->v.p.status)
{
+ case status_disabled:
prog->v.p.comp->flags &= ~CF_DISABLED;
@@ -1883,5 +1884,6 @@ fun_start (struct json_value *result, struct prog *prog)
json_object_set_string (result, "status", "OK");
- }
- else if (prog->v.p.status == status_sleeping)
- {
+ break;
+
+ case status_sleeping:
+ case status_finished:
prog->v.p.status = status_enabled;
@@ -1890,5 +1892,5 @@ fun_start (struct json_value *result, struct prog *prog)
json_object_set_string (result, "status", "OK");
- }
- else
- {
+ break;
+
+ default:
json_object_set_string (result, "status", "ER");

Return to:

Send suggestions and report system problems to the System administrator.