[Git][NTPsec/ntpsec][master] Simplify some nomenclature.

Eric S. Raymond gitlab at mg.gitlab.com
Mon Dec 12 00:47:42 UTC 2016


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


Commits:
f9421bcd by Eric S. Raymond at 2016-12-11T19:47:19-05:00
Simplify some nomenclature.

- - - - -


1 changed file:

- include/ntp_types.h


Changes:

=====================================
include/ntp_types.h
=====================================
--- a/include/ntp_types.h
+++ b/include/ntp_types.h
@@ -52,27 +52,27 @@ typedef union {
 #   ifdef WORDS_BIGENDIAN
 	struct {
 		uint32_t hi; uint32_t lo;
-	} D_s;
+	} h;
 #   else
 	struct {
 		uint32_t lo; uint32_t hi;
-	} D_s;
+	} h;
 #   endif
 
-	int64_t	q_s;	/*   signed quad scalar */
-	uint64_t Q_s;	/* unsigned quad scalar */
+	int64_t	s;	/*   signed quad scalar */
+	uint64_t u;	/* unsigned quad scalar */
 } vint64; /* variant int 64 */
 
 /* hide the structure of a vint64 */
-#define vint64lo(n)       (n).D_s.lo
-#define setvint64lo(n,v)  (n).D_s.lo = (v)
-#define vint64hiu(n)      (n).D_s.hi
-#define setvint64hiu(n,v) (n).D_s.hi = (v)
-#define vint64s(n)        (n).q_s
-#define setvint64s(n,v)   (n).q_s = (v)
-#define vint64u(n)        (n).Q_s
-#define setvint64u(n,v)   (n).Q_s = (v)
-#define negvint64(n)      (n).q_s *= -1
+#define vint64lo(n)       (n).h.lo
+#define setvint64lo(n,v)  (n).h.lo = (v)
+#define vint64hiu(n)      (n).h.hi
+#define setvint64hiu(n,v) (n).h.hi = (v)
+#define vint64s(n)        (n).s
+#define setvint64s(n,v)   (n).s = (v)
+#define vint64u(n)        (n).u
+#define setvint64u(n,v)   (n).u = (v)
+#define negvint64(n)      (n).s *= -1
 
 typedef uint16_t	associd_t; /* association ID */
 #define ASSOCID_MAX	USHRT_MAX



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/f9421bcd8a3664f29315075d2d02b46af570d48a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161212/ab478a11/attachment.html>


More information about the vc mailing list