Fix some uses of NULL as non-pointer and 0 for null pointer.
This commit is contained in:
parent
786fb53653
commit
ba40c8d63d
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.14 1999/09/09 17:30:17 jsm Exp $ */
|
||||
/* $NetBSD: main.c,v 1.15 1999/09/17 17:07:11 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.14 1999/09/09 17:30:17 jsm Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.15 1999/09/17 17:07:11 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -120,7 +120,7 @@ main(argc, argv)
|
||||
/* use whole screen for text */
|
||||
if (tflag)
|
||||
begscr = 0;
|
||||
t = time(0);
|
||||
t = time(NULL);
|
||||
srandom(t); /* 'random' seed */
|
||||
|
||||
#ifdef V7
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bog.c,v 1.12 1999/09/08 21:17:44 jsm Exp $ */
|
||||
/* $NetBSD: bog.c,v 1.13 1999/09/17 17:07:11 jsm Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)bog.c 8.2 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: bog.c,v 1.12 1999/09/08 21:17:44 jsm Exp $");
|
||||
__RCSID("$NetBSD: bog.c,v 1.13 1999/09/17 17:07:11 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -604,7 +604,7 @@ checkdict()
|
||||
}
|
||||
mword[nmwords++] = mwordsp;
|
||||
p = w;
|
||||
while ((*mwordsp++ = *p++) != NULL)
|
||||
while ((*mwordsp++ = *p++) != '\0')
|
||||
;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quiz.c,v 1.15 1999/09/12 09:02:22 jsm Exp $ */
|
||||
/* $NetBSD: quiz.c,v 1.16 1999/09/17 17:07:11 jsm Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)quiz.c 8.3 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: quiz.c,v 1.15 1999/09/12 09:02:22 jsm Exp $");
|
||||
__RCSID("$NetBSD: quiz.c,v 1.16 1999/09/17 17:07:11 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -342,7 +342,7 @@ appdstr(s, tp, len)
|
||||
|
||||
if ((m = malloc(strlen(s) + len + 1)) == NULL)
|
||||
errx(1, "malloc");
|
||||
for (mp = m, sp = s; (*mp++ = *sp++) != NULL; )
|
||||
for (mp = m, sp = s; (*mp++ = *sp++) != '\0'; )
|
||||
;
|
||||
--mp;
|
||||
if (*(mp - 1) == '\\')
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: game.c,v 1.5 1997/10/13 19:44:09 christos Exp $ */
|
||||
/* $NetBSD: game.c,v 1.6 1999/09/17 17:07:11 jsm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)game.c 8.2 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: game.c,v 1.5 1997/10/13 19:44:09 christos Exp $");
|
||||
__RCSID("$NetBSD: game.c,v 1.6 1999/09/17 17:07:11 jsm Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -52,7 +52,8 @@ char *af;
|
||||
int turns;
|
||||
|
||||
turns = ship->specs->ta;
|
||||
if ((*af = (ship->file->drift > 1 && turns)) != NULL) {
|
||||
*af = (ship->file->drift > 1 && turns);
|
||||
if (*af != '\0') {
|
||||
turns--;
|
||||
if (ship->file->FS == 1)
|
||||
turns = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user