[Git][NTPsec/ntpsec][master] More cleanups around time64_t

Hal Murray gitlab at mg.gitlab.com
Thu Dec 15 03:55:12 UTC 2016


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
8debcff1 by Hal Murray at 2016-12-14T19:54:42-08:00
More cleanups around time64_t

- - - - -


1 changed file:

- include/ntp_types.h


Changes:

=====================================
include/ntp_types.h
=====================================
--- a/include/ntp_types.h
+++ b/include/ntp_types.h
@@ -47,14 +47,10 @@
  */
 
 typedef uint64_t time64_t;
-#define LAST32MASK	0x00000000ffffffffUL
-#define FIRST32MASK	0xffffffff00000000UL
-#define GET32LAST(n)	((n) & LAST32MASK)
-#define SET32LAST(n, v) (n) = (((n) & FIRST32MASK) | ((v) & LAST32MASK))
-#define GET32FIRST(n)	((n) >> 32)
-#define SET32FIRST(n,v) (n) = ((((v) & LAST32MASK) << 32) | ((n) & LAST32MASK))
-#define time64lo(n)       ((uint32_t)GET32LAST(n))
-#define settime64lo(n,v)  SET32LAST(n,v)
+#define LOW32MASK	0x00000000ffffffffUL
+#define HIGH32MASK	0xffffffff00000000UL
+#define time64lo(n)	((uint32_t)((n) & LOW32MASK))
+#define settime64lo(n, v) (n) = (((n) & HIGH32MASK) | ((v) & LOW32MASK))
 #define time64s(n)        ((int64_t)(n))
 #define settime64s(n,v)   (n) = ((int64_t)(v))
 #define time64u(n)        (n)



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/8debcff12dffed8c95b84fa9dfa6bbe640ee6d94
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20161215/63638b89/attachment.html>


More information about the vc mailing list