diff options
author | wiz <wiz@pkgsrc.org> | 2004-03-22 11:44:24 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2004-03-22 11:44:24 +0000 |
commit | 8c2fda69bb4182c55e027c71cbc605304244e999 (patch) | |
tree | 3470be79d8e5a7cca69bdad0c6dad96102df189f | |
parent | e4742db813e70c85d566611950d739b284897ac9 (diff) | |
download | pkgsrc-8c2fda69bb4182c55e027c71cbc605304244e999.tar.gz |
1.39 from usr.sbin/pkg_install/info/main.c:
Check pkgdb_open for correct return value.
From Peter Postma in PR 24863.
-rw-r--r-- | pkgtools/pkg_install/files/info/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgtools/pkg_install/files/info/main.c b/pkgtools/pkg_install/files/info/main.c index 6fb9ce6be3f..e4b77ad7be0 100644 --- a/pkgtools/pkg_install/files/info/main.c +++ b/pkgtools/pkg_install/files/info/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.7 2004/01/06 15:53:41 hubertf Exp $ */ +/* $NetBSD: main.c,v 1.8 2004/03/22 11:44:24 wiz Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -11,7 +11,7 @@ #if 0 static char *rcsid = "from FreeBSD Id: main.c,v 1.14 1997/10/08 07:47:26 charnier Exp"; #else -__RCSID("$NetBSD: main.c,v 1.7 2004/01/06 15:53:41 hubertf Exp $"); +__RCSID("$NetBSD: main.c,v 1.8 2004/03/22 11:44:24 wiz Exp $"); #endif #endif @@ -242,7 +242,7 @@ main(int argc, char **argv) /* Get all the remaining package names, if any */ if (File2Pkg && !AllInstalled) - if (pkgdb_open(ReadOnly) == -1) { + if (!pkgdb_open(ReadOnly)) { err(EXIT_FAILURE, "cannot open pkgdb"); } while (*argv) { |