Browse Source

Remove unused function argument variables 'len' and 'auth' from

ntp_sendmsg().  They have been removed from the function body in the past
but not from the argument list.
From Maxime Villard
OPENBSD_5_4
mglocker 11 years ago
parent
commit
27f85bb7b7
4 changed files with 8 additions and 10 deletions
  1. +2
    -3
      src/usr.sbin/ntpd/client.c
  2. +2
    -3
      src/usr.sbin/ntpd/ntp_msg.c
  3. +2
    -2
      src/usr.sbin/ntpd/ntpd.h
  4. +2
    -2
      src/usr.sbin/ntpd/server.c

+ 2
- 3
src/usr.sbin/ntpd/client.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: client.c,v 1.89 2011/09/21 15:41:30 phessler Exp $ */
/* $OpenBSD: client.c,v 1.90 2013/04/30 11:42:56 mglocker Exp $ */
/* /*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -186,8 +186,7 @@ client_query(struct ntp_peer *p)
p->query->msg.xmttime.fractionl = arc4random(); p->query->msg.xmttime.fractionl = arc4random();
p->query->xmttime = gettime_corrected(); p->query->xmttime = gettime_corrected();
if (ntp_sendmsg(p->query->fd, NULL, &p->query->msg,
NTP_MSGSIZE_NOAUTH, 0) == -1) {
if (ntp_sendmsg(p->query->fd, NULL, &p->query->msg) == -1) {
p->senderrors++; p->senderrors++;
set_next(p, INTERVAL_QUERY_PATHETIC); set_next(p, INTERVAL_QUERY_PATHETIC);
p->trustlevel = TRUSTLEVEL_PATHETIC; p->trustlevel = TRUSTLEVEL_PATHETIC;


+ 2
- 3
src/usr.sbin/ntpd/ntp_msg.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntp_msg.c,v 1.18 2007/10/19 15:53:57 otto Exp $ */
/* $OpenBSD: ntp_msg.c,v 1.19 2013/04/30 11:42:56 mglocker Exp $ */
/* /*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -40,8 +40,7 @@ ntp_getmsg(struct sockaddr *sa, char *p, ssize_t len, struct ntp_msg *msg)
} }
int int
ntp_sendmsg(int fd, struct sockaddr *sa, struct ntp_msg *msg, ssize_t len,
int auth)
ntp_sendmsg(int fd, struct sockaddr *sa, struct ntp_msg *msg)
{ {
socklen_t sa_len; socklen_t sa_len;
ssize_t n; ssize_t n;


+ 2
- 2
src/usr.sbin/ntpd/ntpd.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.h,v 1.106 2012/09/20 12:43:16 patrick Exp $ */
/* $OpenBSD: ntpd.h,v 1.107 2013/04/30 11:42:56 mglocker Exp $ */
/* /*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -226,7 +226,7 @@ struct ntp_conf_sensor *new_sensor(char *);
/* ntp_msg.c */ /* ntp_msg.c */
int ntp_getmsg(struct sockaddr *, char *, ssize_t, struct ntp_msg *); int ntp_getmsg(struct sockaddr *, char *, ssize_t, struct ntp_msg *);
int ntp_sendmsg(int, struct sockaddr *, struct ntp_msg *, ssize_t, int);
int ntp_sendmsg(int, struct sockaddr *, struct ntp_msg *);
/* server.c */ /* server.c */
int setup_listeners(struct servent *, struct ntpd_conf *, u_int *); int setup_listeners(struct servent *, struct ntpd_conf *, u_int *);


+ 2
- 2
src/usr.sbin/ntpd/server.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: server.c,v 1.36 2011/09/21 15:41:30 phessler Exp $ */
/* $OpenBSD: server.c,v 1.37 2013/04/30 11:42:56 mglocker Exp $ */
/* /*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -210,6 +210,6 @@ server_dispatch(int fd, struct ntpd_conf *lconf)
reply.rootdelay = d_to_sfp(lconf->status.rootdelay); reply.rootdelay = d_to_sfp(lconf->status.rootdelay);
reply.refid = lconf->status.refid; reply.refid = lconf->status.refid;
ntp_sendmsg(fd, (struct sockaddr *)&fsa, &reply, size, 0);
ntp_sendmsg(fd, (struct sockaddr *)&fsa, &reply);
return (0); return (0);
} }

Loading…
Cancel
Save