summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@1ts.org>2009-08-03 04:55:57 +0000
committerGravatar Karl Ramm <kcr@1ts.org>2009-08-03 04:55:57 +0000
commitbafea4e550d8b07ea1b754404fe172216845a685 (patch)
tree1965acf392c4ad6e5e171c91767f0c344680a0d7 /python
parent88a99453969432dee640a2cba59e47798e5cd7b9 (diff)
Work around a... sign extension edge case?
Diffstat (limited to 'python')
-rwxr-xr-xpython/zephyr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/zephyr.py b/python/zephyr.py
index 61beea5..f316bde 100755
--- a/python/zephyr.py
+++ b/python/zephyr.py
@@ -176,7 +176,7 @@ class _ZTimeval_Net(_ZTimeval):
"""When _ZTimeval is used in a ZUnique_Id_t, the time parts are
stored in network byte order. Handle this by faking up a different type."""
def pformat(self):
- return pformat_timeval(socket.ntohl(self.tv_sec), socket.ntohl(self.tv_usec))
+ return pformat_timeval(socket.ntohl(self.tv_sec & 0xffffffff), socket.ntohl(self.tv_usec & 0xffffffff))
# typedef struct _ZUnique_Id_t {
class ZUnique_Id_t(Structure):