summaryrefslogtreecommitdiffstats
path: root/hack
diff options
context:
space:
mode:
authorjnemeth <jnemeth@NetBSD.org>2006-03-29 01:21:07 +0000
committerjnemeth <jnemeth@NetBSD.org>2006-03-29 01:21:07 +0000
commitf7632ca5f1d0c2bb51ed237d0306cf226b710c1a (patch)
tree5fd85a030424c32821297e17ef4ada5a5096da61 /hack
parentf01282b66ee470388fbdfd0bfd5631060888d063 (diff)
downloadbsdgames-darwin-f7632ca5f1d0c2bb51ed237d0306cf226b710c1a.tar.gz
bsdgames-darwin-f7632ca5f1d0c2bb51ed237d0306cf226b710c1a.tar.zst
bsdgames-darwin-f7632ca5f1d0c2bb51ed237d0306cf226b710c1a.zip
Fix Coverity issue 891 -- FORWARD_NULL.
Approved by christos@.
Diffstat (limited to 'hack')
-rw-r--r--hack/hack.pager.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hack/hack.pager.c b/hack/hack.pager.c
index d72d800b..4b3ceed0 100644
--- a/hack/hack.pager.c
+++ b/hack/hack.pager.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.pager.c,v 1.7 2003/04/02 18:36:39 jsm Exp $ */
+/* $NetBSD: hack.pager.c,v 1.8 2006/03/29 01:21:07 jnemeth Exp $ */
/*
* Copyright (c) 1985, Stichting Centrum voor Wiskunde en Informatica,
@@ -63,7 +63,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.pager.c,v 1.7 2003/04/02 18:36:39 jsm Exp $");
+__RCSID("$NetBSD: hack.pager.c,v 1.8 2006/03/29 01:21:07 jnemeth Exp $");
#endif /* not lint */
/* This file contains the command routine dowhatis() and a pager. */
@@ -98,6 +98,10 @@ dowhatis()
if (ep)
*ep = 0;
/* else: bad data file */
+ else {
+ pline("Bad data file!");
+ return(0);
+ }
/* Expand tab 'by hand' */
if (buf[1] == '\t') {
buf = bufr;