File 0185-Improve-spec-and-doc-for-inet-get_rc-0.patch of Package erlang

From b3a617b7398603c047204fb17198657a626a0f90 Mon Sep 17 00:00:00 2001
From: Raimo Niskanen <raimo@erlang.org>
Date: Thu, 20 Jul 2017 16:08:23 +0200
Subject: [PATCH] Improve spec and doc for inet:get_rc/0

---
 lib/kernel/doc/src/inet.xml | 11 +++++++++--
 lib/kernel/src/inet.erl     |  3 ++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml
index b71e8a1e5..169a76463 100644
--- a/lib/kernel/doc/src/inet.xml
+++ b/lib/kernel/doc/src/inet.xml
@@ -222,11 +222,18 @@ fe80::204:acff:fe17:bf38
       <name name="get_rc" arity="0"/>
       <fsummary>Return a list of IP configuration parameters.</fsummary>
       <desc>
-        <p>Returns the state of the <c>Inet</c> configuration database in
+        <p>
+	  Returns the state of the <c>Inet</c> configuration database in
           form of a list of recorded configuration parameters. For more
           information, see <seealso marker="erts:inet_cfg">ERTS User's Guide:
           Inet Configuration</seealso>.
-          Only parameters with other than default values are returned.</p>
+	</p>
+        <p>
+	  Only actual parameters with other than default values
+	  are returned, for example not directives that specify
+	  other sources for configuration parameters nor
+	  directives that clear parameters.
+	</p>
       </desc>
     </func>
 
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index 6aef5476f..dc20c21c7 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -151,7 +151,8 @@
 
 %%% ---------------------------------
 
--spec get_rc() -> [{Par :: any(), Val :: any()}].
+-spec get_rc() -> [{Par :: atom(), Val :: any()} |
+                   {Par :: atom(), Val1 :: any(), Val2 :: any()}].
 
 get_rc() ->
     inet_db:get_rc().
-- 
2.13.4

openSUSE Build Service is sponsored by