summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Schweikhardt <schweikh@FreeBSD.org>2003-12-23 15:01:12 +0000
committerJens Schweikhardt <schweikh@FreeBSD.org>2003-12-23 15:01:12 +0000
commitecc68fbe47d76d79fdbda89abf2a26a24331ceaf (patch)
treeb6aef9e035b2b3a0e75c8ab9f4dd3be6f6a2104c
parentdc75b9e808a375aa9552711fcb5fc3493786b46b (diff)
Notes
-rw-r--r--usr.sbin/pkg_install/lib/match.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/lib/match.c b/usr.sbin/pkg_install/lib/match.c
index 5312c27c2041..27db97827d50 100644
--- a/usr.sbin/pkg_install/lib/match.c
+++ b/usr.sbin/pkg_install/lib/match.c
@@ -236,13 +236,14 @@ int
isinstalledpkg(const char *name)
{
char buf[FILENAME_MAX];
+ char buf2[FILENAME_MAX];
snprintf(buf, sizeof(buf), "%s/%s", LOG_DIR, name);
if (!isdir(buf) || access(buf, R_OK) == FAIL)
return FALSE;
- snprintf(buf, sizeof(buf), "%s/%s", buf, CONTENTS_FNAME);
- if (!isfile(buf) || access(buf, R_OK) == FAIL)
+ snprintf(buf2, sizeof(buf2), "%s/%s", buf, CONTENTS_FNAME);
+ if (!isfile(buf2) || access(buf2, R_OK) == FAIL)
return FALSE;
return TRUE;