resourced: Modify switch statement not to fall through 43/315843/1
authorSangYoun Kwak <sy.kwak@samsung.com>
Thu, 8 Aug 2024 06:30:38 +0000 (15:30 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Thu, 8 Aug 2024 06:49:08 +0000 (15:49 +0900)
There was fall-through in the switch statement with other statements and
it decreases readability and maintainability so it was removed.

(This commit fixes same issue of
 8ffd276da7741fd124d4571cfa899cb6bd2cbe08)

Change-Id: I35692a6f397cce1197f744896c7e42bef6d32ecf
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
src/resourced/init.c

index b3262bc84fb4d4fd25c0b59d345c324a40f91c9f..463c7dfad29e7af77a342c76a406093231d2ee8d 100644 (file)
@@ -300,8 +300,8 @@ int fixed_list_init(enum proc_type proc_type)
                        case CPU_SCHED_NONE:
                                if (attr.sched_nice == CPU_INIT_NICE)
                                        goto skip_scheduler_update;
-
-                               /* else go through */
+                               attr.sched_policy = SCHED_OTHER;
+                               break;
                        case CPU_SCHED_OTHER:
                                attr.sched_policy = SCHED_OTHER;
 /*                             error = sched_getattr(pid, &attr, 0);