[Git][NTPsec/ntpsec][master] refclock_generic: change getshort() to remove pointless castings.
Gary E. Miller
gitlab at mg.gitlab.com
Sat May 13 02:57:53 UTC 2017
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
cb308cf8 by Gary E. Miller at 2017-05-12T19:52:19-07:00
refclock_generic: change getshort() to remove pointless castings.
- - - - -
1 changed file:
- ntpd/refclock_generic.c
Changes:
=====================================
ntpd/refclock_generic.c
=====================================
--- a/ntpd/refclock_generic.c
+++ b/ntpd/refclock_generic.c
@@ -4889,12 +4889,12 @@ getdbl(
return uval.dv;
}
-static int
+static short
getshort(
unsigned char *p
)
{
- return (int) get_msb_short(&p);
+ return (short) get_msb_short(&p);
}
/*--------------------------------------------------
@@ -5118,11 +5118,11 @@ trimbletsip_message(
case CMD_RUTCPARAM:
{
float t0t = getflt((unsigned char *)&mb(14));
- short wnt = (short) getshort((unsigned char *)&mb(18));
- short dtls = (short) getshort((unsigned char *)&mb(12));
- short wnlsf = (short) getshort((unsigned char *)&mb(20));
- short dn = (short) getshort((unsigned char *)&mb(22));
- short dtlsf = (short) getshort((unsigned char *)&mb(24));
+ short wnt = getshort((unsigned char *)&mb(18));
+ short dtls = getshort((unsigned char *)&mb(12));
+ short wnlsf = getshort((unsigned char *)&mb(20));
+ short dn = getshort((unsigned char *)&mb(22));
+ short dtlsf = getshort((unsigned char *)&mb(24));
if ((int)t0t != 0)
{
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/cb308cf8e16b95c78fd86272f888f6c5f3b029bd
---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/cb308cf8e16b95c78fd86272f888f6c5f3b029bd
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/20170513/60824426/attachment.html>
More information about the vc
mailing list