diff options
author | joerg <joerg> | 2009-03-06 15:18:42 +0000 |
---|---|---|
committer | joerg <joerg> | 2009-03-06 15:18:42 +0000 |
commit | e6c88bb44868d65b07cd8a0af312769ca8be72f3 (patch) | |
tree | 3cc65207ccce98f550367dff3e5c1135181d2762 /pkgtools | |
parent | 7d3dd894dcb536fe81f4d3412d865005e4460c30 (diff) | |
download | pkgsrc-e6c88bb44868d65b07cd8a0af312769ca8be72f3.tar.gz |
Avoid sign comparision issues.
Diffstat (limited to 'pkgtools')
-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; } |