Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/common/include/linux fix another sign compa...



details:   https://anonhg.NetBSD.org/src/rev/996cc92914db
branches:  trunk
changeset: 464231:996cc92914db
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Sep 29 00:10:02 2019 +0000

description:
fix another sign compare warning:

cast 'int ret' to size_t when comparing against another size_t
and 'ret' has known to be 0 or positive.

diffstat:

 sys/external/bsd/common/include/linux/kernel.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 55c812a02f2f -r 996cc92914db sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h    Sat Sep 28 18:03:18 2019 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h    Sun Sep 29 00:10:02 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernel.h,v 1.21 2018/08/27 14:48:07 riastradh Exp $    */
+/*     $NetBSD: kernel.h,v 1.22 2019/09/29 00:10:02 mrg Exp $  */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -165,7 +165,7 @@
                return ret;
        if (__predict_false(size == 0))
                return 0;
-       if (__predict_false(size <= ret))
+       if (__predict_false(size <= (size_t)ret))
                return (size - 1);
 
        return ret;



Home | Main Index | Thread Index | Old Index