Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pkg_install/lib handle NULL pen variable more grace...
details: https://anonhg.NetBSD.org/src/rev/228e103b1119
branches: trunk
changeset: 495192:228e103b1119
user: hubertf <hubertf%NetBSD.org@localhost>
date: Mon Jul 24 02:54:22 2000 +0000
description:
handle NULL pen variable more gracefully in find_play_pen()
diffstat:
usr.sbin/pkg_install/lib/pen.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (26 lines):
diff -r ecdc50dc1df8 -r 228e103b1119 usr.sbin/pkg_install/lib/pen.c
--- a/usr.sbin/pkg_install/lib/pen.c Mon Jul 24 02:30:40 2000 +0000
+++ b/usr.sbin/pkg_install/lib/pen.c Mon Jul 24 02:54:22 2000 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: pen.c,v 1.16 1999/08/24 00:48:39 hubertf Exp $ */
+/* $NetBSD: pen.c,v 1.17 2000/07/24 02:54:22 hubertf Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: pen.c,v 1.25 1997/10/08 07:48:12 charnier Exp";
#else
-__RCSID("$NetBSD: pen.c,v 1.16 1999/08/24 00:48:39 hubertf Exp $");
+__RCSID("$NetBSD: pen.c,v 1.17 2000/07/24 02:54:22 hubertf Exp $");
#endif
#endif
@@ -87,7 +87,7 @@
char *cp;
struct stat sb;
- if (pen[0] && stat(pen, &sb) != FAIL && (min_free(pen) >= sz))
+ if (pen && pen[0] && stat(pen, &sb) != FAIL && (min_free(pen) >= sz))
return pen;
else if ((cp = getenv("PKG_TMPDIR")) != NULL && stat(cp, &sb) != FAIL && (min_free(cp) >= sz))
(void) snprintf(pen, pensize, "%s/instmp.XXXXXX", cp);
Home |
Main Index |
Thread Index |
Old Index