Source-Changes-HG archive

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

[src/trunk]: src/sys/ddb avoid assigning both signed and unsigned variables i...



details:   https://anonhg.NetBSD.org/src/rev/76ea86ecb68e
branches:  trunk
changeset: 961556:76ea86ecb68e
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Apr 12 02:49:02 2021 +0000

description:
avoid assigning both signed and unsigned variables in the same statement.

diffstat:

 sys/ddb/db_sym.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 9c196e4d4182 -r 76ea86ecb68e sys/ddb/db_sym.c
--- a/sys/ddb/db_sym.c  Mon Apr 12 02:23:41 2021 +0000
+++ b/sys/ddb/db_sym.c  Mon Apr 12 02:49:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_sym.c,v 1.66 2020/03/30 20:45:59 maya Exp $ */
+/*     $NetBSD: db_sym.c,v 1.67 2021/04/12 02:49:02 mrg Exp $  */
 
 /*
  * Mach Operating System
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.66 2020/03/30 20:45:59 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_sym.c,v 1.67 2021/04/12 02:49:02 mrg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddbparam.h"
@@ -224,7 +224,8 @@
                db_expr_t newdiff;
                db_sym_t ssym;
 
-               newdiff = diff = ~0;
+               diff = ~0u;
+               newdiff = ~0;
                ssym = (*db_symformat->sym_search)
                    (NULL, val, strategy, &newdiff);
                if ((unsigned int) newdiff < diff) {



Home | Main Index | Thread Index | Old Index