diff --git a/src/x86/Gos-freebsd.c b/src/x86/Gos-freebsd.c
index 247c35f..fcd7991 100644
--- a/src/x86/Gos-freebsd.c
+++ b/src/x86/Gos-freebsd.c
@@ -79,7 +79,7 @@ XXX
       (*a->access_mem) (as, ip + 4, &w1, 0, arg) < 0 ||
       (*a->access_mem) (as, ip + 8, &w2, 0, arg) < 0 ||
       (*a->access_mem) (as, ip + 12, &w3, 0, arg) < 0)
-    return ret;
+    return 0;
   if (w0 == 0x2024448d && w1 == 0x01a1b850 && w2 == 0xcd500000 &&
       (w3 & 0xff) == 0x80)
     ret = X86_SCF_FREEBSD_SIGFRAME;
diff --git a/src/x86/Gos-linux.c b/src/x86/Gos-linux.c
index 31f83ba..8e86336 100644
--- a/src/x86/Gos-linux.c
+++ b/src/x86/Gos-linux.c
@@ -59,7 +59,7 @@ unw_is_signal_frame (unw_cursor_t *cursor)
   ip = c->dwarf.ip;
   if ((ret = (*a->access_mem) (as, ip, &w0, 0, arg)) < 0
       || (ret = (*a->access_mem) (as, ip + 4, &w1, 0, arg)) < 0)
-    return ret;
+    return 0;
   ret = ((w0 == 0x0077b858 && w1 == 0x80cd0000)
 	 || (w0 == 0x0000adb8 && (w1 & 0xffffff) == 0x80cd00));
   Debug (16, "returning %d\n", ret);
