summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz>2006-04-05 18:17:08 +0000
committerwiz <wiz>2006-04-05 18:17:08 +0000
commitc5629dffb8bad82ae1f7f8900eddab7c1877b7f5 (patch)
treeb208edc6526a8b876a64710888236cdcfb7f1325
parented805be3b0dd9f3b6930d7233ce13723a2314537 (diff)
downloadpkgsrc-c5629dffb8bad82ae1f7f8900eddab7c1877b7f5.tar.gz
Sync with src/usr.sbin v1.62:
When recognizing a broken package version/name, make sure to error out really, don't just print a warning and the run into further problems. Coverity CID 2739.
-rw-r--r--pkgtools/pkg_install/files/lib/str.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgtools/pkg_install/files/lib/str.c b/pkgtools/pkg_install/files/lib/str.c
index 2ad1c85cda1..1a0ac8338d8 100644
--- a/pkgtools/pkg_install/files/lib/str.c
+++ b/pkgtools/pkg_install/files/lib/str.c
@@ -1,4 +1,4 @@
-/* $NetBSD: str.c,v 1.17 2006/04/04 06:36:12 wiz Exp $ */
+/* $NetBSD: str.c,v 1.18 2006/04/05 18:17:08 wiz Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -11,7 +11,7 @@
#if 0
static const char *rcsid = "Id: str.c,v 1.5 1997/10/08 07:48:21 charnier Exp";
#else
-__RCSID("$NetBSD: str.c,v 1.17 2006/04/04 06:36:12 wiz Exp $");
+__RCSID("$NetBSD: str.c,v 1.18 2006/04/05 18:17:08 wiz Exp $");
#endif
#endif
@@ -315,6 +315,7 @@ findbestmatchingname_fn(const char *found, void *vp)
fprintf(stderr,
"'%s' has no usable package(version)\n",
best);
+ found_version = NULL; /* error out cheaply */
}
}