Browse Source

remove excessive/wrong use of sys/param.h

peanuts -- but all work has to start somewhere.
OPENBSD_5_7
deraadt 9 years ago
parent
commit
eb02123984
9 changed files with 27 additions and 27 deletions
  1. +2
    -2
      src/usr.sbin/ntpd/client.c
  2. +9
    -9
      src/usr.sbin/ntpd/control.c
  3. +2
    -2
      src/usr.sbin/ntpd/ntp.c
  4. +2
    -2
      src/usr.sbin/ntpd/ntp_dns.c
  5. +2
    -2
      src/usr.sbin/ntpd/ntp_msg.c
  6. +2
    -2
      src/usr.sbin/ntpd/ntpd.c
  7. +4
    -4
      src/usr.sbin/ntpd/ntpd.h
  8. +2
    -2
      src/usr.sbin/ntpd/sensors.c
  9. +2
    -2
      src/usr.sbin/ntpd/server.c

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

@ -1,4 +1,4 @@
/* $OpenBSD: client.c,v 1.95 2015/01/04 01:48:49 bcook Exp $ */
/* $OpenBSD: client.c,v 1.96 2015/01/09 07:35:37 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -17,7 +17,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/param.h>
#include <sys/types.h>
#include <errno.h>
#include <md5.h>
#include <stdio.h>


+ 9
- 9
src/usr.sbin/ntpd/control.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: control.c,v 1.3 2015/01/04 01:24:43 bcook Exp $ */
/* $OpenBSD: control.c,v 1.4 2015/01/09 07:35:37 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -170,8 +170,8 @@ control_dispatch_msg(struct pollfd *pfd, u_int *ctl_cnt)
{
struct imsg imsg;
struct ctl_conn *c;
struct ntp_peer *p;
struct ntp_sensor *s;
struct ntp_peer *p;
struct ntp_sensor *s;
struct ctl_show_status c_status;
struct ctl_show_peer c_peer;
struct ctl_show_sensor c_sensor;
@ -289,8 +289,8 @@ session_socket_blockmode(int fd, enum blockmodes bm)
void
build_show_status(struct ctl_show_status *cs)
{
struct ntp_peer *p;
struct ntp_sensor *s;
struct ntp_peer *p;
struct ntp_sensor *s;
cs->peercnt = cs->valid_peers = 0;
cs->sensorcnt = cs->valid_sensors = 0;
@ -314,9 +314,9 @@ build_show_status(struct ctl_show_status *cs)
void
build_show_peer(struct ctl_show_peer *cp, struct ntp_peer *p)
{
const char *a = "not resolved";
const char *pool = "", *addr_head_name = "";
u_int8_t shift, best, validdelaycnt, jittercnt;
const char *a = "not resolved";
const char *pool = "", *addr_head_name = "";
u_int8_t shift, best, validdelaycnt, jittercnt;
time_t now;
now = getmonotime();
@ -395,7 +395,7 @@ void
build_show_sensor(struct ctl_show_sensor *cs, struct ntp_sensor *s)
{
time_t now;
u_int8_t shift;
u_int8_t shift;
u_int32_t refid;
now = getmonotime();


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

@ -1,4 +1,4 @@
/* $OpenBSD: ntp.c,v 1.124 2015/01/04 01:48:49 bcook Exp $ */
/* $OpenBSD: ntp.c,v 1.125 2015/01/09 07:35:37 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -17,7 +17,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/param.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <errno.h>


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

@ -1,4 +1,4 @@
/* $OpenBSD: ntp_dns.c,v 1.5 2014/02/10 09:12:34 dtucker Exp $ */
/* $OpenBSD: ntp_dns.c,v 1.6 2015/01/09 07:35:37 deraadt Exp $ */
/*
* Copyright (c) 2003-2008 Henning Brauer <henning@openbsd.org>
@ -16,7 +16,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/param.h>
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/time.h>


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

@ -1,4 +1,4 @@
/* $OpenBSD: ntp_msg.c,v 1.19 2013/04/30 11:42:56 mglocker Exp $ */
/* $OpenBSD: ntp_msg.c,v 1.20 2015/01/09 07:35:37 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -17,7 +17,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/param.h>
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>


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

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.c,v 1.82 2015/01/08 00:30:08 bcook Exp $ */
/* $OpenBSD: ntpd.c,v 1.83 2015/01/09 07:35:37 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -109,7 +109,7 @@ main(int argc, char *argv[])
int fd_ctl, ch, nfds;
int pipe_chld[2];
struct passwd *pw;
extern char *__progname;
extern char *__progname;
if (strcmp(__progname, "ntpctl") == 0) {
ctl_main (argc, argv);


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

@ -1,4 +1,4 @@
/* $OpenBSD: ntpd.h,v 1.114 2015/01/08 00:30:08 bcook Exp $ */
/* $OpenBSD: ntpd.h,v 1.115 2015/01/09 07:35:37 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -65,7 +65,7 @@
#define MAX_FREQUENCY_ADJUST 128e-5 /* max correction per iteration */
#define REPORT_INTERVAL (24*60*60) /* interval between status reports */
#define MAX_SEND_ERRORS 3 /* max send errors before reconnect */
#define MAX_DISPLAY_WIDTH 80 /* max chars in ctl_show report line */
#define MAX_DISPLAY_WIDTH 80 /* max chars in ctl_show report line */
#define FILTER_ADJFREQ 0x01 /* set after doing adjfreq */
@ -203,7 +203,7 @@ struct ctl_show_status {
};
struct ctl_show_peer {
char peer_desc[MAX_DISPLAY_WIDTH];
char peer_desc[MAX_DISPLAY_WIDTH];
u_int8_t syncedto;
u_int8_t weight;
u_int8_t trustlevel;
@ -330,7 +330,7 @@ int control_listen(int);
void control_shutdown(int);
void control_cleanup(const char *);
int control_accept(int);
struct ctl_conn *control_connbyfd(int);
struct ctl_conn *control_connbyfd(int);
int control_close(int);
int control_dispatch_msg(struct pollfd *, u_int *);
void session_socket_blockmode(int, enum blockmodes);


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

@ -1,4 +1,4 @@
/* $OpenBSD: sensors.c,v 1.48 2015/01/08 00:25:47 bcook Exp $ */
/* $OpenBSD: sensors.c,v 1.49 2015/01/09 07:35:37 deraadt Exp $ */
/*
* Copyright (c) 2006 Henning Brauer <henning@openbsd.org>
@ -16,7 +16,7 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/param.h>
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/sensors.h>
#include <sys/sysctl.h>


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

@ -1,4 +1,4 @@
/* $OpenBSD: server.c,v 1.39 2014/06/03 18:42:29 chl Exp $ */
/* $OpenBSD: server.c,v 1.40 2015/01/09 07:35:37 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@ -17,8 +17,8 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <net/if.h>
#include <errno.h>


Loading…
Cancel
Save