Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Cast argument to abs, not the result.
details: https://anonhg.NetBSD.org/src/rev/8ea85f9bd72b
branches: trunk
changeset: 327124:8ea85f9bd72b
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Feb 27 18:14:52 2014 +0000
description:
Cast argument to abs, not the result.
diffstat:
sys/arch/sparc64/sparc64/db_disasm.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r 0bc1f80ceeaa -r 8ea85f9bd72b sys/arch/sparc64/sparc64/db_disasm.c
--- a/sys/arch/sparc64/sparc64/db_disasm.c Thu Feb 27 18:12:41 2014 +0000
+++ b/sys/arch/sparc64/sparc64/db_disasm.c Thu Feb 27 18:14:52 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.16 2011/04/13 03:25:35 mrg Exp $ */
+/* $NetBSD: db_disasm.c,v 1.17 2014/02/27 18:14:52 joerg Exp $ */
/*
* Copyright (c) 1994 David S. Miller, davem%nadzieja.rutgers.edu@localhost
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.16 2011/04/13 03:25:35 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.17 2014/02/27 18:14:52 joerg Exp $");
#include <sys/param.h>
#include <machine/db_machdep.h>
@@ -1000,12 +1000,12 @@
case 'i':
/* simm13 -- signed */
val = SIGNEX(insn, 13);
- db_printf("%s0x%x", SIGN(val), (int)abs(val));
+ db_printf("%s0x%x", SIGN(val), abs((int)val));
break;
case 'j':
/* simm11 -- signed */
val = SIGNEX(insn, 11);
- db_printf("%s0x%x", SIGN(val), (int)abs(val));
+ db_printf("%s0x%x", SIGN(val), abs((int)val));
break;
case 'l':
val = (((insn>>20)&0x3)<<13)|(insn & 0x1fff);
@@ -1048,7 +1048,7 @@
db_printf("[%%%s %c 0x%x]",
regs[((insn >> 14) & 0x1f)],
(int)((val<0)?'-':'+'),
- (int)abs(val));
+ abs((int)val));
if (*f_ptr == '8')
db_printf(" %%asi");
break;
Home |
Main Index |
Thread Index |
Old Index