Search
j0ke.net Open Build Service
>
Projects
>
J0KE.NET
:
infrastructure
>
qemu-svn
> qemu-0.11-git-user-linux-g2h_and_h2g_fix.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File qemu-0.11-git-user-linux-g2h_and_h2g_fix.patch of Package qemu-svn
Thinking a bit more about this, I wonder if g2h(x) shouldn't itself always return NULL on x == NULL ? Something like: Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de> diff --git a/cpu-all.h b/cpu-all.h index 1a6a812..631f678 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -633,7 +633,7 @@ extern int have_guest_base; #endif /* All direct uses of g2h and h2g need to go away for usermode softmmu. */ -#define g2h(x) ((void *)((unsigned long)(x) + GUEST_BASE)) +#define g2h(x) ( !x ? NULL:((void *)((unsigned long)(x) + GUEST_BASE))) #define h2g(x) ({ \ unsigned long __ret = (unsigned long)(x) - GUEST_BASE; \ /* Check if given address fits target address space */ \