File 2443-snmp-test-Forgot-about-default-clause-darwin.patch of Package erlang
From daba9f488f5b53f6c3f58a526c3a9ecea5995c3a Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Tue, 5 May 2020 08:48:56 +0200
Subject: [PATCH 3/3] [snmp|test] Forgot about default clause (darwin)
---
 lib/snmp/test/snmp_test_lib.erl | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/lib/snmp/test/snmp_test_lib.erl b/lib/snmp/test/snmp_test_lib.erl
index e6213cc085..5cfd401a4c 100644
--- a/lib/snmp/test/snmp_test_lib.erl
+++ b/lib/snmp/test/snmp_test_lib.erl
@@ -888,19 +888,7 @@ analyze_and_print_host_info() ->
                       "~n   Version:        ~p"
                       "~n   Num Schedulers: ~s"
                       "~n", [OsFam, OsName, Version, str_num_schedulers()]),
-            try erlang:system_info(schedulers) of
-                1 ->
-                    10;
-                2 ->
-                    5;
-                N when (N =< 6) ->
-                    2;
-                _ ->
-                    1
-            catch
-                _:_:_ ->
-                    10
-            end
+            {num_schedulers_to_factor(), []}
     end.
 
 linux_which_distro(Version) ->
@@ -1867,6 +1855,21 @@ str_num_schedulers() ->
         _:_:_ -> "-"
     end.
 
+num_schedulers_to_factor() ->
+    try erlang:system_info(schedulers) of
+        1 ->
+            10;
+        2 ->
+            5;
+        N when (N =< 6) ->
+            2;
+        _ ->
+            1
+    catch
+        _:_:_ ->
+            10
+    end.
+
 
 linux_info_lookup(Key, File) ->
     try [string:trim(S) || S <- string:tokens(os:cmd("grep " ++ "\"" ++ Key ++ "\"" ++ " " ++ File), [$:,$\n])] of
-- 
2.26.1