File otp_src_R16B03-1-erts-erl_process.patch of Package erlang

diff -Ndurp otp_src_R16B03-1/erts/emulator/beam/erl_process.c otp_src_R16B03-1-erts-erl_process/erts/emulator/beam/erl_process.c
--- otp_src_R16B03-1/erts/emulator/beam/erl_process.c	2014-01-24 13:30:47.000000000 +0200
+++ otp_src_R16B03-1-erts-erl_process/erts/emulator/beam/erl_process.c	2015-02-14 22:21:24.894457892 +0200
@@ -4416,29 +4416,27 @@ int
 erts_sched_set_wakeup_other_thresold(char *str)
 {
 #ifdef ERTS_SMP
-    ErtsSchedWakeupOtherThreshold threshold;
     if (sys_strcmp(str, "very_high") == 0)
-	threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_VERY_HIGH;
+	wakeup_other.threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_VERY_HIGH;
     else if (sys_strcmp(str, "high") == 0)
-	threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_HIGH;
+	wakeup_other.threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_HIGH;
     else if (sys_strcmp(str, "medium") == 0)
-	threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_MEDIUM;
+	wakeup_other.threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_MEDIUM;
     else if (sys_strcmp(str, "low") == 0)
-	threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_LOW;
+	wakeup_other.threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_LOW;
     else if (sys_strcmp(str, "very_low") == 0)
-	threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_VERY_LOW;
+	wakeup_other.threshold = ERTS_SCHED_WAKEUP_OTHER_THRESHOLD_VERY_LOW;
     else
 	return EINVAL;
-    wakeup_other.threshold = threshold;
     set_wakeup_other_data();
     return 0;
 #else
-    if (sys_strcmp(str, "very_high") == 0 || sys_strcmp(str, "high") == 0 ||
-	sys_strcmp(str, "medium") == 0 || sys_strcmp(str, "low") == 0 ||
-	sys_strcmp(str, "very_low") == 0) {
-	return 0;
-    } 
-    return EINVAL;
+    return sys_strcmp(str, "very_high") &&
+	   sys_strcmp(str, "high") &&
+	   sys_strcmp(str, "medium") &&
+	   sys_strcmp(str, "low") &&
+	   sys_strcmp(str, "very_low")
+	   ? EINVAL : 0;
 #endif
 }
 
@@ -4446,20 +4444,15 @@ int
 erts_sched_set_wakeup_other_type(char *str)
 {
 #ifdef ERTS_SMP
-    ErtsSchedWakeupOtherType type;
     if (sys_strcmp(str, "default") == 0)
-	type = ERTS_SCHED_WAKEUP_OTHER_TYPE_DEFAULT;
+	wakeup_other.type = ERTS_SCHED_WAKEUP_OTHER_TYPE_DEFAULT;
     else if (sys_strcmp(str, "legacy") == 0)
-	type = ERTS_SCHED_WAKEUP_OTHER_TYPE_LEGACY;
+	wakeup_other.type = ERTS_SCHED_WAKEUP_OTHER_TYPE_LEGACY;
     else
 	return EINVAL;
-    wakeup_other.type = type;
     return 0;
 #else
-    if (sys_strcmp(str, "default") == 0 || sys_strcmp(str, "legacy") == 0) {
-	return 0;
-    } 
-    return EINVAL;
+    return sys_strcmp(str, "default") && sys_strcmp(str, "legacy") ? EINVAL : 0;
 #endif
 }
 
openSUSE Build Service is sponsored by