Avoid sign comparision issues.
This commit is contained in:
parent
45b1b4e597
commit
2901543f5b
1 changed files with 3 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dewey.c,v 1.10 2009/02/02 12:35:01 joerg Exp $ */
|
||||
/* $NetBSD: dewey.c,v 1.11 2009/03/06 15:18:42 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 a new issue