Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 Cast to uint64_t first in case the input is...
details: https://anonhg.NetBSD.org/src/rev/8524b38bfb59
branches: trunk
changeset: 340243:8524b38bfb59
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Aug 28 14:06:01 2015 +0000
description:
Cast to uint64_t first in case the input is negative.
diffstat:
sys/arch/x86/x86/ipmi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 84830491e710 -r 8524b38bfb59 sys/arch/x86/x86/ipmi.c
--- a/sys/arch/x86/x86/ipmi.c Fri Aug 28 13:20:46 2015 +0000
+++ b/sys/arch/x86/x86/ipmi.c Fri Aug 28 14:06:01 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipmi.c,v 1.61 2015/04/13 16:03:51 riastradh Exp $ */
+/* $NetBSD: ipmi.c,v 1.62 2015/08/28 14:06:01 joerg Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.61 2015/04/13 16:03:51 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipmi.c,v 1.62 2015/08/28 14:06:01 joerg Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -1303,7 +1303,7 @@
/* fixpoint arithmetic */
#define FIX2INT(x) ((int64_t)((x) >> 32))
-#define INT2FIX(x) ((int64_t)((int64_t)(x) << 32))
+#define INT2FIX(x) ((int64_t)((uint64_t)(x) << 32))
#define FIX2 0x0000000200000000ll /* 2.0 */
#define FIX3 0x0000000300000000ll /* 3.0 */
Home |
Main Index |
Thread Index |
Old Index