bug-hurd
[Top][All Lists]
Advanced

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

[PATCH 04/29] i386/i386/db_trace.c: use long instead of an int


From: Marin Ramesa
Subject: [PATCH 04/29] i386/i386/db_trace.c: use long instead of an int
Date: Mon, 9 Dec 2013 23:57:19 +0100

This is more in line with how the function db_lookup_i386_kreg() is
called. In this way there are two casts less and one GCC warning is
silenced.

* i386/i386/db_trace.c (db_lookup_i386_kreg) (kregp): Use long instead of an 
int.
(db_lookup_i386_kreg): Don't cast return value.

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

diff --git a/i386/i386/db_trace.c b/i386/i386/db_trace.c
index fb65524..f906152 100644
--- a/i386/i386/db_trace.c
+++ b/i386/i386/db_trace.c
@@ -107,13 +107,13 @@ struct i386_kregs {
 long *
 db_lookup_i386_kreg(
        char    *name,
-       int     *kregp)
+       long    *kregp)
 {
        struct i386_kregs *kp;
 
        for (kp = i386_kregs; kp->name; kp++) {
            if (strcmp(name, kp->name) == 0)
-               return (long *)((long)kregp + kp->offset);
+               return (kregp + kp->offset);
        }
        return 0;
 }
-- 
1.8.1.4




reply via email to

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