pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files/lib Avoid sign comparision ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e17f61ae9c00
branches: trunk
changeset: 555676:e17f61ae9c00
user: joerg <joerg%pkgsrc.org@localhost>
date: Fri Mar 06 15:18:42 2009 +0000
description:
Avoid sign comparision issues.
diffstat:
pkgtools/pkg_install/files/lib/dewey.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 4e1f0d3bcf99 -r e17f61ae9c00 pkgtools/pkg_install/files/lib/dewey.c
--- a/pkgtools/pkg_install/files/lib/dewey.c Fri Mar 06 15:17:34 2009 +0000
+++ b/pkgtools/pkg_install/files/lib/dewey.c Fri Mar 06 15:18:42 2009 +0000
@@ -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 @@
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 @@
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;
}
Home |
Main Index |
Thread Index |
Old Index