Avoid sign comparision issues.
This commit is contained in:
parent
7ef7e1b997
commit
08d9a1067c
7
external/bsd/pkg_install/dist/lib/dewey.c
vendored
7
external/bsd/pkg_install/dist/lib/dewey.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dewey.c,v 1.1.1.2 2009/02/02 20:44:06 joerg Exp $ */
|
||||
/* $NetBSD: dewey.c,v 1.2 2009/03/06 15:17:56 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright © 2002 Alistair G. Crooks. All rights reserved.
|
||||
@ -226,8 +226,7 @@ static int
|
||||
vtest(arr_t *lhs, int tst, arr_t *rhs)
|
||||
{
|
||||
int cmp;
|
||||
int c;
|
||||
int i;
|
||||
unsigned int c, i;
|
||||
|
||||
for (i = 0, c = MAX(lhs->c, rhs->c) ; i < c ; i++) {
|
||||
if ((cmp = DIGIT(lhs->v, lhs->c, i) - DIGIT(rhs->v, rhs->c, i)) != 0) {
|
||||
@ -307,7 +306,7 @@ dewey_match(const char *pattern, const char *pkg)
|
||||
if (sep2) {
|
||||
char ver[PKG_PATTERN_MAX];
|
||||
|
||||
strlcpy(ver, sep, MIN(sizeof(ver), sep2-sep+1));
|
||||
strlcpy(ver, sep, MIN((ssize_t)sizeof(ver), sep2-sep+1));
|
||||
if (dewey_cmp(version, op, ver))
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user