[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
- [PATCH 01/29] i386: move prototypes to fix implicit declaration of function, Marin Ramesa, 2013/12/09
- [PATCH 03/29] i386/i386/db_interface.c: use vm_offset_t instead of an unsigned int, Marin Ramesa, 2013/12/09
- [PATCH 06/29] device/chario.c (char_write): check if io_count is larger or equal to zero and cast it to vm_size_t, Marin Ramesa, 2013/12/09
- [PATCH 07/29] device/chario.c (char_read): check if io_count is larger or equal to zero, Marin Ramesa, 2013/12/09
- [PATCH 08/29] device/chario.c: trivial stylistic fix for consistency, Marin Ramesa, 2013/12/09