[Git][NTPsec/ntpsec][master] 3 commits: libisc: remove unneeded shim isc_net_probeipv4()

Gary E. Miller gitlab at mg.gitlab.com
Tue Jun 6 23:52:22 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
ed0a3833 by Gary E. Miller at 2017-06-06T16:37:59-07:00
libisc: remove unneeded shim isc_net_probeipv4()

collapse isc_net_probeipv4() into isc_net_probeipv4_bool().

- - - - -
ca3919d0 by Gary E. Miller at 2017-06-06T16:37:59-07:00
libisc: improve comments on isc_net_probeipv[46]_bool()

- - - - -
866534e8 by Gary E. Miller at 2017-06-06T16:50:49-07:00
libisc: merge isc_net_probe_ipv6only(), isc_net_probe_ipv6only_bool()

The only call to isc_net_probe_ipv6only() was from
isc_net_probe_ipv6only_bool().

- - - - -


2 changed files:

- libisc/include/isc/netaddr.h
- libisc/net.c


Changes:

=====================================
libisc/include/isc/netaddr.h
=====================================
--- a/libisc/include/isc/netaddr.h
+++ b/libisc/include/isc/netaddr.h
@@ -58,21 +58,22 @@ typedef struct isc_netaddr	isc_netaddr_t;		/* Net Address */
  ***/
 
 bool isc_net_probeipv4_bool(void);
-
-isc_result_t
-isc_net_probeipv4(void);
 /*
  * Check if the system's kernel supports IPv4.
  *
  * Returns:
- *
- *	#ISC_R_SUCCESS		IPv4 is supported.
- *	#ISC_R_NOTFOUND		IPv4 is not supported.
- *	#ISC_R_DISABLED		IPv4 is disabled.
- *	#ISC_R_UNEXPECTED
+ *     True    IPv4 is supported.
+ *     False   IPv4 is not supported.
  */
 
 bool isc_net_probeipv6_bool(void);
+/*
+ * Check if the system's kernel supports IPv6.
+ *
+ * Returns:
+ *     True    IPv4 is supported.
+ *     False   IPv4 is not supported.
+ */
 
 isc_result_t
 isc_net_probeipv6(void);
@@ -89,20 +90,6 @@ isc_net_probeipv6(void);
 
 bool
 isc_net_probe_ipv6only_bool(void);
-isc_result_t
-isc_net_probe_ipv6only(void);
-
-/*
- * Check if the system's kernel supports the IPV6_(RECV)PKTINFO socket option
- * for UDP sockets.
- *
- * Returns:
- *
- * 	#ISC_R_SUCCESS		the option is supported.
- * 	#ISC_R_NOTFOUND		IPv6 itself or the option is not supported.
- * 	#ISC_R_UNEXPECTED
- */
-
 
 struct isc_netaddr {
 	unsigned int family;


=====================================
libisc/net.c
=====================================
--- a/libisc/net.c
+++ b/libisc/net.c
@@ -116,12 +116,8 @@ initialize(void) {
 
 bool
 isc_net_probeipv4_bool(void) {
-  return (ISC_R_SUCCESS == isc_net_probeipv4());
-}
-isc_result_t
-isc_net_probeipv4(void) {
-	initialize();
-	return (ipv4_result);
+    initialize();
+    return (ISC_R_SUCCESS == ipv4_result);
 }
 
 bool
@@ -202,11 +198,6 @@ initialize_ipv6only(void) {
 
 bool
 isc_net_probe_ipv6only_bool(void) {
-    return (ISC_R_SUCCESS == isc_net_probe_ipv6only());
-}
-
-isc_result_t
-isc_net_probe_ipv6only(void) {
-	initialize_ipv6only();
-	return (ipv6only_result);
+    initialize_ipv6only();
+    return (ISC_R_SUCCESS == ipv6only_result);
 }



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/7bb7a656cbabd4be451d35c6a6058fac9ca8a56d...866534e8c1984954c4b580a89e73c2ac7711c6d9

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/7bb7a656cbabd4be451d35c6a6058fac9ca8a56d...866534e8c1984954c4b580a89e73c2ac7711c6d9
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170606/e0f1c949/attachment.html>


More information about the vc mailing list