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/delete Add some sanity checks on what p...
details: https://anonhg.NetBSD.org/src/rev/190f61ff0e75
branches: trunk
changeset: 476674:190f61ff0e75
user: hubertf <hubertf%NetBSD.org@localhost>
date: Fri Sep 24 14:39:44 1999 +0000
description:
Add some sanity checks on what pkgdb_retrieve() returns.
Noted by D'Arcy J.M. Cain <darcy%druid.druid.net@localhost> on current-users.
diffstat:
usr.sbin/pkg_install/delete/main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 6b61412f6e77 -r 190f61ff0e75 usr.sbin/pkg_install/delete/main.c
--- a/usr.sbin/pkg_install/delete/main.c Fri Sep 24 14:28:14 1999 +0000
+++ b/usr.sbin/pkg_install/delete/main.c Fri Sep 24 14:39:44 1999 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: main.c,v 1.13 1999/08/24 00:48:39 hubertf Exp $ */
+/* $NetBSD: main.c,v 1.14 1999/09/24 14:39:44 hubertf Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char *rcsid = "from FreeBSD Id: main.c,v 1.11 1997/10/08 07:46:48 charnier Exp";
#else
-__RCSID("$NetBSD: main.c,v 1.13 1999/08/24 00:48:39 hubertf Exp $");
+__RCSID("$NetBSD: main.c,v 1.14 1999/09/24 14:39:44 hubertf Exp $");
#endif
#endif
@@ -181,6 +181,8 @@
error = 0;
while ((key = pkgdb_iter())) {
val = pkgdb_retrieve(key);
+ if (val == NULL || *val == '\0')
+ continue;
lpp = TAILQ_FIRST(&pkgs);
if (lpp != NULL) {
Home |
Main Index |
Thread Index |
Old Index