summaryrefslogtreecommitdiff
path: root/net/ntp/files/patch-ntpd__refclock__mx4200.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2017-03-23 05:51:59 +0000
committerCy Schubert <cy@FreeBSD.org>2017-03-23 05:51:59 +0000
commit34d196cb529008a75cd10eedac165a5974bf5e89 (patch)
tree13a4bd294c0e8b42b99c3940bb48d6ac6a38a3fa /net/ntp/files/patch-ntpd__refclock__mx4200.c
parent- Update WWW (diff)
Update 4.2.8p9 --> 4.2.8p10
Diffstat (limited to 'net/ntp/files/patch-ntpd__refclock__mx4200.c')
-rw-r--r--net/ntp/files/patch-ntpd__refclock__mx4200.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/net/ntp/files/patch-ntpd__refclock__mx4200.c b/net/ntp/files/patch-ntpd__refclock__mx4200.c
index f0181520b7c3..6a809f3ad19f 100644
--- a/net/ntp/files/patch-ntpd__refclock__mx4200.c
+++ b/net/ntp/files/patch-ntpd__refclock__mx4200.c
@@ -1,6 +1,6 @@
---- ntpd/refclock_mx4200.c.orig 2014-12-19 11:56:52 UTC
-+++ ntpd/refclock_mx4200.c
-@@ -1572,7 +1572,7 @@ mx4200_debug(struct peer *peer, char *fm
+--- ntpd/refclock_mx4200.c.orig 2017-03-21 06:04:19.000000000 -0700
++++ ntpd/refclock_mx4200.c 2017-03-22 22:34:58.631582000 -0700
+@@ -1572,7 +1572,7 @@
* Print debug message to stdout
* In the future, we may want to get get more creative...
*/
@@ -9,17 +9,20 @@
va_end(ap);
}
-@@ -1613,11 +1613,11 @@ mx4200_send(peer, fmt, va_alist)
+@@ -1614,14 +1614,14 @@
+ #else
+ va_start(ap);
+ #endif /* __STDC__ */
+- n = VSNPRINTF((cp, (size_t)(ep - cp), fmt, ap));
++ n = vsnprintf(cp, (size_t)(ep - cp), fmt, ap);
+ va_end(ap);
+ if (n < 0 || (size_t)n >= (size_t)(ep - cp))
+ goto overflow;
- cp = buf;
- *cp++ = '$';
-- n = VSNPRINTF((cp, sizeof(buf) - 1, fmt, ap));
-+ n = vsnprintf(cp, sizeof(buf) - 1, fmt, ap);
ck = mx4200_cksum(cp, n);
+ cp += n;
+- n = SNPRINTF((cp, (size_t)(ep - cp), "*%02X\r\n", ck));
++ n = snprintf(cp, (size_t)(ep - cp), "*%02X\r\n", ck);
+ if (n < 0 || (size_t)n >= (size_t)(ep - cp))
+ goto overflow;
cp += n;
- ++n;
-- n += SNPRINTF((cp, sizeof(buf) - n - 5, "*%02X\r\n", ck));
-+ n += snprintf(cp, sizeof(buf) - n - 5, "*%02X\r\n", ck);
-
- m = write(pp->io.fd, buf, (unsigned)n);
- if (m < 0)