From 25665981dd793b68604567181e50d307831c96f1 Mon Sep 17 00:00:00 2001 From: bmilekic Date: Fri, 1 Aug 2003 17:26:41 +0000 Subject: Use strncmp() and not strcmp() here to properly match installed ports. Submitted by: Harold Gutch --- usr.sbin/pkg_install/lib/match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin') 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; } -- cgit v1.1