[Git][NTPsec/ntpsec][master] Removed excess parentheses from former C macros
Ian Bruene
gitlab at mg.gitlab.com
Wed Aug 23 17:49:52 UTC 2017
Ian Bruene pushed to branch master at NTPsec / ntpsec
Commits:
794b694e by Ian Bruene at 2017-08-23T12:48:19-05:00
Removed excess parentheses from former C macros
- - - - -
1 changed file:
- pylib/packet.py
Changes:
=====================================
pylib/packet.py
=====================================
--- a/pylib/packet.py
+++ b/pylib/packet.py
@@ -333,11 +333,11 @@ class Packet:
# The following two methods are copied from macros in includes/control.h
@staticmethod
def VN_MODE(v, m):
- return ((((v) & 7) << 3) | ((m) & 0x7))
+ return (((v & 7) << 3) | (m & 0x7))
@staticmethod
def PKT_LI_VN_MODE(l, v, m):
- return ((((l) & 3) << 6) | Packet.VN_MODE((v), (m)))
+ return (((l & 3) << 6) | Packet.VN_MODE(v, m))
def __init__(self, mode=ntp.magic.MODE_CLIENT,
version=ntp.magic.NTP_VERSION, session=None):
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/794b694e758e3fcaa12330df8bf43514eca4aae7
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/794b694e758e3fcaa12330df8bf43514eca4aae7
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/20170823/29ac4e85/attachment.html>
More information about the vc
mailing list