Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ddb avoid leftshift of an unsigned value
details: https://anonhg.NetBSD.org/src/rev/3d6c28253991
branches: trunk
changeset: 359199:3d6c28253991
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Feb 04 09:17:54 2018 +0000
description:
avoid leftshift of an unsigned value
diffstat:
sys/ddb/db_access.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 6c9d84be9195 -r 3d6c28253991 sys/ddb/db_access.c
--- a/sys/ddb/db_access.c Sun Feb 04 09:15:44 2018 +0000
+++ b/sys/ddb/db_access.c Sun Feb 04 09:17:54 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_access.c,v 1.22 2015/06/06 22:06:05 matt Exp $ */
+/* $NetBSD: db_access.c,v 1.23 2018/02/04 09:17:54 mrg Exp $ */
/*
* Mach Operating System
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_access.c,v 1.22 2015/06/06 22:06:05 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_access.c,v 1.23 2018/02/04 09:17:54 mrg Exp $");
#if defined(_KERNEL_OPT)
#include "opt_kgdb.h"
@@ -74,7 +74,7 @@
if (size < sizeof(db_expr_t) && is_signed
&& (value & ((db_expr_t)1 << (8*size - 1)))) {
- value |= ~(db_expr_t)0 << (8*size - 1);
+ value |= (unsigned long)~(db_expr_t)0 << (8*size - 1);
}
return (value);
}
Home |
Main Index |
Thread Index |
Old Index