diff options
author | mikel <mikel@NetBSD.org> | 1997-07-10 06:47:29 +0000 |
---|---|---|
committer | mikel <mikel@NetBSD.org> | 1997-07-10 06:47:29 +0000 |
commit | 3638c6860decfacc7974156434d4dfdd31a47443 (patch) | |
tree | a9ae7c77eed0cc7616f27a050fc8dadeccaa2071 /cribbage/instr.c | |
parent | 6170d87a62457fdea2faa68464de66f4ff98e654 (diff) | |
download | bsdgames-darwin-3638c6860decfacc7974156434d4dfdd31a47443.tar.gz bsdgames-darwin-3638c6860decfacc7974156434d4dfdd31a47443.tar.zst bsdgames-darwin-3638c6860decfacc7974156434d4dfdd31a47443.zip |
make explicit comparisons to NULL, s/rindex/strrchr/
Diffstat (limited to 'cribbage/instr.c')
-rw-r--r-- | cribbage/instr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cribbage/instr.c b/cribbage/instr.c index c2ab997a..936302e0 100644 --- a/cribbage/instr.c +++ b/cribbage/instr.c @@ -1,4 +1,4 @@ -/* $NetBSD: instr.c,v 1.4 1996/02/06 22:47:18 jtc Exp $ */ +/* $NetBSD: instr.c,v 1.5 1997/07/10 06:47:30 mikel Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)instr.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: instr.c,v 1.4 1996/02/06 22:47:18 jtc Exp $"; +static char rcsid[] = "$NetBSD: instr.c,v 1.5 1997/07/10 06:47:30 mikel Exp $"; #endif #endif /* not lint */ @@ -76,10 +76,10 @@ instructions() case 0: if (!(path = getenv("PAGER"))) path = _PATH_MORE; - if (pager = rindex(path, '/')) + if ((pager = strrchr(path, '/')) != NULL) ++pager; pager = path; - execlp(path, pager, _PATH_INSTR, (char *)NULL); + execlp(path, pager, _PATH_INSTR, NULL); (void)fprintf(stderr, "cribbage: %s.\n", strerror(errno)); _exit(1); default: |