Module Name:    src
Committed By:   joerg
Date:           Fri Aug 28 14:06:01 UTC 2015

Modified Files:
        src/sys/arch/x86/x86: ipmi.c

Log Message:
Cast to uint64_t first in case the input is negative.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/x86/x86/ipmi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/x86/ipmi.c
diff -u src/sys/arch/x86/x86/ipmi.c:1.61 src/sys/arch/x86/x86/ipmi.c:1.62
--- src/sys/arch/x86/x86/ipmi.c:1.61	Mon Apr 13 16:03:51 2015
+++ src/sys/arch/x86/x86/ipmi.c	Fri Aug 28 14:06:01 2015
@@ -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 @@ signextend(unsigned long val, int bits)
 
 /* 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 */

Reply via email to