Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/nvi/dist/common Fix -Wsign-compare issue for BI...



details:   https://anonhg.NetBSD.org/src/rev/c4b21c5d50b4
branches:  trunk
changeset: 827963:c4b21c5d50b4
user:      rin <rin%NetBSD.org@localhost>
date:      Tue Nov 21 02:04:39 2017 +0000

description:
Fix -Wsign-compare issue for BINC_GOTO in a similar manner to BINC_RET.

diffstat:

 external/bsd/nvi/dist/common/mem.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 024d15ae8e5a -r c4b21c5d50b4 external/bsd/nvi/dist/common/mem.h
--- a/external/bsd/nvi/dist/common/mem.h        Tue Nov 21 02:00:29 2017 +0000
+++ b/external/bsd/nvi/dist/common/mem.h        Tue Nov 21 02:04:39 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mem.h,v 1.2 2013/11/22 15:52:05 christos Exp $ */
+/*     $NetBSD: mem.h,v 1.3 2017/11/21 02:04:39 rin Exp $ */
 /*-
  * Copyright (c) 1993, 1994
  *     The Regents of the University of California.  All rights reserved.
@@ -23,7 +23,7 @@
 #define        BINC_GOTO(sp, type, lp, llen, nlen) {                           \
        CHECK_TYPE(type *, lp)                                          \
        void *L__bincp;                                                 \
-       if ((nlen) > llen) {                                            \
+       if ((size_t)(nlen) > llen) {                                    \
                if ((L__bincp = binc(sp, lp, &(llen), nlen)) == NULL)   \
                        goto alloc_err;                                 \
                /*                                                      \



Home | Main Index | Thread Index | Old Index