bug-hurd
[Top][All Lists]
Advanced

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

[PATCH 03/08] i386/i386/db_trace.c (db_i386_stack_trace): remove unneces


From: Marin Ramesa
Subject: [PATCH 03/08] i386/i386/db_trace.c (db_i386_stack_trace): remove unnecessary cast
Date: Tue, 10 Dec 2013 19:19:58 +0100

Argument to INKERNEL() is already cast to vm_offset_t in the macro itself.

* i386/i386/db_trace.c (db_i386_stack_trace) (INKERNEL) (callpc): Don't cast to 
unsigned long.
(db_i386_stack_trace) (INKERNEL) (frame): Likewise.

---
 i386/i386/db_trace.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c
index 0b78ed8..7033da5 100644
--- a/i386/i386/db_trace.c
+++ b/i386/i386/db_trace.c
@@ -425,7 +425,7 @@ db_i386_stack_trace(
        if (!db_trace_symbols_found)
            db_find_trace_symbols();
 
-       if (!INKERNEL((unsigned long)callpc) && !INKERNEL((unsigned 
long)frame)) {
+       if (!INKERNEL(callpc) && !INKERNEL(frame)) {
            db_printf(">>>>> user space <<<<<\n");
            user_frame++;
        }
@@ -436,7 +436,7 @@ db_i386_stack_trace(
            char *      name;
            db_expr_t   offset;
 
-           if (INKERNEL((unsigned long)callpc) && user_frame == 0) {
+           if (INKERNEL(callpc) && user_frame == 0) {
                db_addr_t call_func = 0;
 
                db_sym_t sym_tmp;
@@ -461,7 +461,7 @@ db_i386_stack_trace(
                    frame_type = 0;
                    narg = db_numargs(frame, task);
                }
-           } else if (INKERNEL((unsigned long)callpc) ^ INKERNEL((unsigned 
long)frame)) {
+           } else if (INKERNEL(callpc) ^ INKERNEL(frame)) {
                frame_type = 0;
                narg = -1;
            } else {
@@ -506,7 +506,7 @@ db_i386_stack_trace(
                break;
            }
            if (!INKERNEL(lastframe) ||
-               (!INKERNEL((unsigned long)callpc) && !INKERNEL((unsigned 
long)frame)))
+               (!INKERNEL(callpc) && !INKERNEL(frame)))
                user_frame++;
            if (user_frame == 1) {
                db_printf(">>>>> user space <<<<<\n");
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]