pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pbulk/files/pbulk/lib Merge lib/dewey.c rev 1...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ad3f696cd36d
branches:  trunk
changeset: 555677:ad3f696cd36d
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Mar 06 15:19:04 2009 +0000

description:
Merge lib/dewey.c rev 1.11 from pkg_install:
Avoid sign comparision issues.

diffstat:

 pkgtools/pbulk/files/pbulk/lib/match.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r e17f61ae9c00 -r ad3f696cd36d pkgtools/pbulk/files/pbulk/lib/match.c
--- a/pkgtools/pbulk/files/pbulk/lib/match.c    Fri Mar 06 15:18:42 2009 +0000
+++ b/pkgtools/pbulk/files/pbulk/lib/match.c    Fri Mar 06 15:19:04 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: match.c,v 1.3 2008/09/22 11:31:16 joerg Exp $ */
+/* $NetBSD: match.c,v 1.4 2009/03/06 15:19:04 joerg Exp $ */
 
 /*
  * Copyright © 2002 Alistair G. Crooks.  All rights reserved.
@@ -273,9 +273,8 @@
 static int
 vtest(arr_t *lhs, int tst, arr_t *rhs)
 {
+       unsigned int c, i;
        int cmp;
-       int     c;
-       int     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) {
@@ -353,7 +352,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