aboutsummaryrefslogtreecommitdiff
path: root/ntpd/refclock_bancomm.c
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2014-12-20 22:52:39 +0000
committerCy Schubert <cy@FreeBSD.org>2014-12-20 22:52:39 +0000
commitb5e14a1344528861a7016aa2c6b0f2e9630d1526 (patch)
treef04bed14f7e8aed5c0e9d2f7785175c7951036d3 /ntpd/refclock_bancomm.c
parent2b45e011ca352ce509bc83ae148230aeee0c7e0d (diff)
downloadsrc-b5e14a1344528861a7016aa2c6b0f2e9630d1526.tar.gz
src-b5e14a1344528861a7016aa2c6b0f2e9630d1526.zip
Vendor import ntp 4.2.8.vendor/ntp/4.2.8
Reviewed by: roberto Security: VUXML: 4033d826-87dd-11e4-9079-3c970e169bc2 Security: http://www.kb.cert.org/vuls/id/852879 Security: CVE-2014-9293 Security CVE-2014-9294 Security CVE-2014-9295 Security CVE-2014-9296
Notes
Notes: svn path=/vendor/ntp/dist/; revision=275970 svn path=/vendor/ntp/4.2.8/; revision=275971; tag=vendor/ntp/4.2.8
Diffstat (limited to 'ntpd/refclock_bancomm.c')
-rw-r--r--ntpd/refclock_bancomm.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/ntpd/refclock_bancomm.c b/ntpd/refclock_bancomm.c
index 3bb0ffea430a..49922e39345c 100644
--- a/ntpd/refclock_bancomm.c
+++ b/ntpd/refclock_bancomm.c
@@ -146,11 +146,6 @@ typedef void *SYMMT_PCI_HANDLE;
extern u_long current_time; /* current time(s) */
/*
- * Imported from ntpd module
- */
-extern volatile int debug; /* global debug flag */
-
-/*
* VME unit control structure.
* Changes made to vmeunit structure. Most members are now available in the
* new refclockproc structure in ntp_refclock.h - 07/99 - Ganesh Ramasivan
@@ -266,21 +261,21 @@ vme_start(
/*
* Allocate unit structure
*/
- vme = (struct vmeunit *)emalloc(sizeof(struct vmeunit));
- bzero((char *)vme, sizeof(struct vmeunit));
+ vme = emalloc_zero(sizeof(struct vmeunit));
/*
* Set up the structures
*/
pp = peer->procptr;
- pp->unitptr = (caddr_t) vme;
+ pp->unitptr = vme;
pp->timestarted = current_time;
pp->io.clock_recv = vme_receive;
- pp->io.srcclock = (caddr_t)peer;
+ pp->io.srcclock = peer;
pp->io.datalen = 0;
pp->io.fd = fd_vme;
+ /* shouldn't there be an io_addclock() call? */
/*
* All done. Initialize a few random peer variables, then
@@ -309,7 +304,7 @@ vme_shutdown(
* Tell the I/O module to turn us off. We're history.
*/
pp = peer->procptr;
- vme = (struct vmeunit *)pp->unitptr;
+ vme = pp->unitptr;
io_closeclock(&pp->io);
pp->unitptr = NULL;
if (NULL != vme)
@@ -349,7 +344,7 @@ vme_poll(
struct tm *tadr;
pp = peer->procptr;
- vme = (struct vmeunit *)pp->unitptr; /* Here is the structure */
+ vme = pp->unitptr; /* Here is the structure */
tptr = &vme->vmedata;
if ((tptr = get_datumtime(tptr)) == NULL ) {
@@ -454,7 +449,7 @@ get_datumtime(struct vmedate *time_vme)
* the time.
*/
if(ioctl (fd_vme, SELTIMEFORMAT, TIME_DECIMAL)){
- msyslog(LOG_ERR, "Could not set time format\n");
+ msyslog(LOG_ERR, "Could not set time format");
return (NULL);
}
/* read the time */