[PATCH] ntdll: Reuse signal to trap translation for FreeBSD on ARM

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] ntdll: Reuse signal to trap translation for FreeBSD on ARM

André Hentschel
Signed-off-by: André Hentschel <[hidden email]>
---
 dlls/ntdll/signal_arm.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c
index 5db3c51301f..e01c8ce2193 100644
--- a/dlls/ntdll/signal_arm.c
+++ b/dlls/ntdll/signal_arm.c
@@ -148,7 +148,8 @@ static inline enum arm_trap_code get_trap_code( int signal, const ucontext_t *si
     enum arm_trap_code trap = TRAP_sig(sigcontext);
     if (trap)
         return trap;
-    /* trap is 0 on arm64 kernel */
+#endif
+
     switch (signal)
     {
     case SIGILL:
@@ -158,11 +159,8 @@ static inline enum arm_trap_code get_trap_code( int signal, const ucontext_t *si
     case SIGBUS:
         return TRAP_ARM_ALIGNFLT;
     default:
-        return trap;
+        return TRAP_ARM_UNKNOWN;
     }
-#else
-    return TRAP_ARM_UNKNOWN;  /* unknown trap code */
-#endif
 }
 
 /***********************************************************************
--
2.17.1