diff options
-rw-r--r-- | pkgtools/pkg_install/files/lib/dewey.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pkgtools/pkg_install/files/lib/dewey.c b/pkgtools/pkg_install/files/lib/dewey.c index 98240c7221d..56c73b70dfe 100644 --- a/pkgtools/pkg_install/files/lib/dewey.c +++ b/pkgtools/pkg_install/files/lib/dewey.c @@ -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; } |