About 13 years ago when the idiom srandom(time()), and sometimes

srandom(time()+getpid()), was changed by srandomdev(), but #include <time.h>
lived up until this day so remove it.

Additionally, earlier than that, 18 years ago, random(6) was one of the first
consumers of arc4random(3) family, and was pulling it from dev/rndvar.h but
these days we pull it from stdlib.h, which is already done, so while here
remove dev/rndvar.h also.

"seems comprehensive to me" deraadt@ and OK tb@
This commit is contained in:
mestre 2016-01-03 14:38:16 +00:00
parent 257cba2189
commit 9ea8ec706f
20 changed files with 42 additions and 53 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: init.c,v 1.13 2014/12/31 15:45:57 tedu Exp $ */
/* $OpenBSD: init.c,v 1.14 2016/01/03 14:38:16 mestre Exp $ */
/* $NetBSD: init.c,v 1.4 1996/05/21 21:53:05 mrg Exp $ */
/*-
@ -41,11 +41,10 @@
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include "hdr.h"
#include "extern.h"
#include "hdr.h"
int blklin = TRUE;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: wizard.c,v 1.17 2014/12/31 15:45:57 tedu Exp $ */
/* $OpenBSD: wizard.c,v 1.18 2016/01/03 14:38:16 mestre Exp $ */
/* $NetBSD: wizard.c,v 1.3 1995/04/24 12:21:41 cgd Exp $ */
/*-
@ -39,11 +39,11 @@
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include "hdr.h"
#include <string.h>
#include "extern.h"
#include "hdr.h"
#if 0
void

View File

@ -1,4 +1,4 @@
/* $OpenBSD: arithmetic.c,v 1.22 2015/12/25 20:59:09 mestre Exp $ */
/* $OpenBSD: arithmetic.c,v 1.23 2016/01/03 14:38:16 mestre Exp $ */
/*
* Copyright (c) 1989, 1993
@ -67,7 +67,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
int getrandom(int, int, int);

View File

@ -1,4 +1,4 @@
/* $OpenBSD: extern.c,v 1.7 2015/12/31 16:50:29 mestre Exp $ */
/* $OpenBSD: extern.c,v 1.8 2016/01/03 14:38:16 mestre Exp $ */
/* $NetBSD: extern.c,v 1.4 1995/04/27 21:22:19 mycroft Exp $ */
/*-
@ -44,7 +44,6 @@
#include <stdio.h>
#include <termios.h>
#include <time.h>
#include "def.h"
#include "extern.h"

View File

@ -1,4 +1,4 @@
/* $OpenBSD: main.c,v 1.22 2015/12/02 20:05:01 tb Exp $ */
/* $OpenBSD: main.c,v 1.23 2016/01/03 14:38:16 mestre Exp $ */
/*
* Copyright (c) 1980, 1993
@ -30,7 +30,7 @@
*/
#include <err.h>
#include <time.h>
#include "back.h"
#include "backlocal.h"

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bog.c,v 1.26 2015/11/30 08:27:46 tb Exp $ */
/* $OpenBSD: bog.c,v 1.27 2016/01/03 14:38:16 mestre Exp $ */
/* $NetBSD: bog.c,v 1.5 1995/04/24 12:22:32 cgd Exp $ */
/*-
@ -39,7 +39,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "bog.h"

View File

@ -1,4 +1,4 @@
/* $OpenBSD: mach.c,v 1.17 2015/12/27 01:28:02 chl Exp $ */
/* $OpenBSD: mach.c,v 1.18 2016/01/03 14:38:16 mestre Exp $ */
/* $NetBSD: mach.c,v 1.5 1995/04/28 22:28:48 mycroft Exp $ */
/*-
@ -49,7 +49,6 @@
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <time.h>
#include "bog.h"
#include "extern.h"

View File

@ -1,4 +1,4 @@
/* $OpenBSD: bs.c,v 1.34 2015/12/26 00:26:39 mestre Exp $ */
/* $OpenBSD: bs.c,v 1.35 2016/01/03 14:38:17 mestre Exp $ */
/*
* Copyright (c) 1986, Bruce Holloway
* All rights reserved.
@ -47,7 +47,6 @@
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
typedef struct {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: canfield.c,v 1.23 2015/12/26 00:26:39 mestre Exp $ */
/* $OpenBSD: canfield.c,v 1.24 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: canfield.c,v 1.7 1995/05/13 07:28:35 jtc Exp $ */
/*
@ -45,15 +45,14 @@
#include <ctype.h>
#include <curses.h>
#include <errno.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <time.h>
#include <unistd.h>
#define decksize 52

View File

@ -1,4 +1,4 @@
/* $OpenBSD: fish.c,v 1.19 2015/12/25 20:59:09 mestre Exp $ */
/* $OpenBSD: fish.c,v 1.20 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: fish.c,v 1.3 1995/03/23 08:28:18 cgd Exp $ */
/*-
@ -35,6 +35,7 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <err.h>
#include <fcntl.h>
#include <paths.h>
@ -42,7 +43,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include "pathnames.h"
#define RANKS 13

View File

@ -1,4 +1,4 @@
/* $OpenBSD: strfile.c,v 1.24 2015/12/25 20:59:09 mestre Exp $ */
/* $OpenBSD: strfile.c,v 1.25 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: strfile.c,v 1.4 1995/04/24 12:23:09 cgd Exp $ */
/*-
@ -39,8 +39,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "strfile.h"
/*

View File

@ -1,4 +1,4 @@
/* $OpenBSD: grdc.c,v 1.22 2015/12/25 20:59:09 mestre Exp $ */
/* $OpenBSD: grdc.c,v 1.23 2016/01/03 14:38:17 mestre Exp $ */
/*
*
* Copyright 2002 Amos Shapir. Public domain.
@ -11,14 +11,14 @@
* 10-18-89 added signal handling
*/
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <curses.h>
#include <limits.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <err.h>

View File

@ -1,4 +1,4 @@
/* $OpenBSD: save.c,v 1.9 2015/11/11 01:12:10 deraadt Exp $ */
/* $OpenBSD: save.c,v 1.10 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: save.c,v 1.4 1995/03/24 05:02:13 cgd Exp $ */
/*
@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
#include <time.h>
#include "mille.h"
/*

View File

@ -1,4 +1,4 @@
/* $OpenBSD: include.h,v 1.5 2014/11/16 04:49:48 guenther Exp $ */
/* $OpenBSD: include.h,v 1.6 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: include.h,v 1.3 1995/04/24 12:24:31 cgd Exp $ */
/*
@ -16,7 +16,6 @@
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "macros.h"

View File

@ -1,4 +1,4 @@
/* $OpenBSD: quiz.c,v 1.24 2015/12/25 20:59:09 mestre Exp $ */
/* $OpenBSD: quiz.c,v 1.25 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: quiz.c,v 1.9 1995/04/22 10:16:58 cgd Exp $ */
/*-
@ -35,16 +35,17 @@
*/
#include <sys/types.h>
#include <ctype.h>
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <err.h>
#include <time.h>
#include <unistd.h>
#include "quiz.h"
#include "pathnames.h"
#include "quiz.h"
static QE qlist;
static int catone, cattwo, tflag;

View File

@ -1,4 +1,4 @@
/* $OpenBSD: random.c,v 1.15 2015/12/25 20:59:09 mestre Exp $ */
/* $OpenBSD: random.c,v 1.16 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: random.c,v 1.3 1995/04/22 07:44:05 cgd Exp $ */
/*
@ -35,13 +35,10 @@
#include <sys/types.h>
#include <dev/rndvar.h>
#include <err.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
#include <limits.h>

View File

@ -1,4 +1,4 @@
/* $OpenBSD: snake.c,v 1.20 2015/12/02 18:52:23 tb Exp $ */
/* $OpenBSD: snake.c,v 1.21 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: snake.c,v 1.8 1995/04/29 00:06:41 mycroft Exp $ */
/*
@ -55,7 +55,6 @@
#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <time.h>
#include <unistd.h>
#ifdef DEBUG

View File

@ -1,4 +1,4 @@
/* $OpenBSD: scores.c,v 1.17 2015/12/27 01:24:27 chl Exp $ */
/* $OpenBSD: scores.c,v 1.18 2016/01/03 14:38:17 mestre Exp $ */
/* $NetBSD: scores.c,v 1.2 1995/04/22 07:42:38 cgd Exp $ */
/*-
@ -42,22 +42,21 @@
*
* Major whacks since then.
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <errno.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <term.h>
#include <unistd.h>
#include "screen.h"
#include "scores.h"
#include "screen.h"
#include "tetris.h"
/*

View File

@ -1,4 +1,4 @@
/* $OpenBSD: worm.c,v 1.35 2015/12/26 00:26:40 mestre Exp $ */
/* $OpenBSD: worm.c,v 1.36 2016/01/03 14:38:17 mestre Exp $ */
/*
* Copyright (c) 1980, 1993
@ -35,13 +35,13 @@
*/
#include <sys/types.h>
#include <ctype.h>
#include <curses.h>
#include <err.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <poll.h>

View File

@ -1,4 +1,4 @@
/* $OpenBSD: wump.c,v 1.28 2015/12/25 20:59:09 mestre Exp $ */
/* $OpenBSD: wump.c,v 1.29 2016/01/03 14:38:17 mestre Exp $ */
/*
* Copyright (c) 1989, 1993
@ -41,14 +41,15 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <err.h>
#include <fcntl.h>
#include <paths.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "pathnames.h"
/* some defines to spec out what our wumpus cave should look like */