summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/lib
diff options
context:
space:
mode:
authorbmilekic <bmilekic@FreeBSD.org>2003-08-01 17:26:41 +0000
committerbmilekic <bmilekic@FreeBSD.org>2003-08-01 17:26:41 +0000
commit25665981dd793b68604567181e50d307831c96f1 (patch)
treea5f8a752d52b113384cbd6dbd48966a9520036d0 /usr.sbin/pkg_install/lib
parente43686a8dce4909587cda7c2b406b65036f62289 (diff)
downloadFreeBSD-src-25665981dd793b68604567181e50d307831c96f1.zip
FreeBSD-src-25665981dd793b68604567181e50d307831c96f1.tar.gz
Use strncmp() and not strcmp() here to properly match
installed ports. Submitted by: Harold Gutch <logix@foobar.franken.de>
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r--usr.sbin/pkg_install/lib/match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/lib/match.c b/usr.sbin/pkg_install/lib/match.c
index 5312c27..550993a 100644
--- a/usr.sbin/pkg_install/lib/match.c
+++ b/usr.sbin/pkg_install/lib/match.c
@@ -212,7 +212,7 @@ matchbyorigin(const char *origin, int *retval)
continue;
cmd = plist_cmd(tmp + 1, &cp);
if (cmd == PLIST_ORIGIN) {
- if (strcmp(origin, cp) == 0)
+ if (strncmp(origin, cp, strlen(origin)) == 0)
storeappend(store, installed[i]);
break;
}
OpenPOWER on IntegriCloud