Modify switch statement not to fall through 45/315845/1
authorSangYoun Kwak <sy.kwak@samsung.com>
Thu, 8 Aug 2024 03:57:11 +0000 (12:57 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Thu, 8 Aug 2024 06:57:31 +0000 (15:57 +0900)
There was fall-through in the switch statement with other statements and
it decreases readability and maintainability so it was removed.

This patch will fix a SVACE issue with WGID=226809

Change-Id: I23a438cd5b56ad2e4d35767d3b2e5bb1168b811c
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
src/process/proc-main.c

index a619cccf41118f61205f97cde74ae4bf8ef1db38..b29084eb6161badea173bd70b2e50df6f1692ede 100644 (file)
@@ -984,8 +984,8 @@ __attribute__((weak)) struct proc_app_info *proc_create_app_info(const char *app
                                        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);