[Git][NTPsec/ntpsec][master] Remove unnecessary indirection to standardized type.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Mar 30 09:17:46 UTC 2017


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
dddd7376 by Eric S. Raymond at 2017-03-30T05:17:03-04:00
Remove unnecessary indirection to standardized type.

- - - - -


2 changed files:

- ntpd/ntp_io.c
- wafhelpers/configure.py


Changes:

=====================================
ntpd/ntp_io.c
=====================================
--- a/ntpd/ntp_io.c
+++ b/ntpd/ntp_io.c
@@ -2235,7 +2235,7 @@ read_network_packet(
 	l_fp			ts
 	)
 {
-	GETSOCKNAME_SOCKLEN_TYPE fromlen;
+	socklen_t fromlen;
 	ssize_t buflen;
 	register struct recvbuf *rb;
 #ifdef USE_PACKET_TIMESTAMP
@@ -2688,12 +2688,12 @@ findlocalinterface(
 	int		bcast
 	)
 {
-	GETSOCKNAME_SOCKLEN_TYPE	sockaddrlen;
-	endpt *				iface;
-	sockaddr_u			saddr;
-	SOCKET				s;
-	int				rtn;
-	int				on;
+	socklen_t	sockaddrlen;
+	endpt *		iface;
+	sockaddr_u	saddr;
+	SOCKET		s;
+	int		rtn;
+	int		on;
 
 	DPRINTF(4, ("Finding interface for addr %s in list of addresses\n",
 		    socktoa(addr)));


=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -434,9 +434,6 @@ int main(int argc, char **argv) {
     for header, sizeof in sorted(sizeofs, key=lambda x: x[1:]):
         check_sizeof(ctx, header, sizeof)
 
-    ctx.define("GETSOCKNAME_SOCKLEN_TYPE", "socklen_t", quote=False,
-               comment="socklen type")
-
     # These are helpful and don't break Linux or *BSD
     ctx.define("OPEN_BCAST_SOCKET", 1,
                comment="Whether to open a broadcast socket")



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/dddd73763bf5c0ded17b80e66d194273cd3cbaed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170330/7d52bbd3/attachment.html>


More information about the vc mailing list