summaryrefslogtreecommitdiff
path: root/sbin/restore
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-02 11:26:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-02 11:26:24 +0000
commit4b4cb93bc1aa77c5befcb1fed86ed63e09070ceb (patch)
tree774511751d6c292b4f404f43da5c688a2bba1564 /sbin/restore
parenteb7176541670a2cd46dfc08d54e8327137d067ba (diff)
ptr check in skipdirs(), by joerg from freebsd
Diffstat (limited to 'sbin/restore')
-rw-r--r--sbin/restore/dirs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c
index 26f88872070..7b8dd515868 100644
--- a/sbin/restore/dirs.c
+++ b/sbin/restore/dirs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dirs.c,v 1.6 1996/07/09 02:11:13 deraadt Exp $ */
+/* $OpenBSD: dirs.c,v 1.7 1996/08/02 11:26:23 deraadt Exp $ */
/* $NetBSD: dirs.c,v 1.16 1995/06/19 00:20:11 cgd Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)dirs.c 8.5 (Berkeley) 8/31/94";
#else
-static char rcsid[] = "$OpenBSD: dirs.c,v 1.6 1996/07/09 02:11:13 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: dirs.c,v 1.7 1996/08/02 11:26:23 deraadt Exp $";
#endif
#endif /* not lint */
@@ -232,7 +232,7 @@ void
skipdirs()
{
- while ((curfile.dip->di_mode & IFMT) == IFDIR) {
+ while (curfile.dip && (curfile.dip->di_mode & IFMT) == IFDIR) {
skipfile();
}
}