diff options
author | joerg <joerg> | 2008-04-07 13:25:32 +0000 |
---|---|---|
committer | joerg <joerg> | 2008-04-07 13:25:32 +0000 |
commit | 81e03ac5b5546e9a8052d127fd1cdeebf673942d (patch) | |
tree | e5737a35f3c2798a9c5454b205cca3e31edb408d /pkgtools | |
parent | f898fc7899544ee3ec48f3b6280d6e48e30cb24e (diff) | |
download | pkgsrc-81e03ac5b5546e9a8052d127fd1cdeebf673942d.tar.gz |
Simplify logic and make pkgdbdir the default for
pkg_vulnerabilities_dir.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/admin/config.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pkgtools/pkg_install/files/admin/config.c b/pkgtools/pkg_install/files/admin/config.c index 327cdba11bc..073642fbc10 100644 --- a/pkgtools/pkg_install/files/admin/config.c +++ b/pkgtools/pkg_install/files/admin/config.c @@ -1,4 +1,4 @@ -/* $NetBSD: config.c,v 1.4 2008/04/07 13:07:14 joerg Exp $ */ +/* $NetBSD: config.c,v 1.5 2008/04/07 13:25:32 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -8,7 +8,7 @@ #include <sys/cdefs.h> #endif #ifndef lint -__RCSID("$NetBSD: config.c,v 1.4 2008/04/07 13:07:14 joerg Exp $"); +__RCSID("$NetBSD: config.c,v 1.5 2008/04/07 13:25:32 joerg Exp $"); #endif /*- @@ -80,10 +80,9 @@ pkg_install_config(const char *config_file) *var->var = value; } - if (pkg_vulnerabilities_dir != NULL) - ret = asprintf(&value, "%s/pkg-vulnerabilities", pkg_vulnerabilities_dir); - else - ret = asprintf(&value, "%s/pkg-vulnerabilities", _pkgdb_getPKGDB_DIR()); + if (pkg_vulnerabilities_dir == NULL) + pkg_vulnerabilities_dir = _pkgdb_getPKGDB_DIR(); + ret = asprintf(&value, "%s/pkg-vulnerabilities", pkg_vulnerabilities_dir); pkg_vulnerabilities_file = value; if (ret == -1) err(EXIT_FAILURE, "asprintf failed"); |