[libunwind] Delete unused handlerNotFound in unwind_phase1
authorFangrui Song <i@maskray.me>
Sat, 21 Nov 2020 20:38:00 +0000 (12:38 -0800)
committerFangrui Song <i@maskray.me>
Sat, 21 Nov 2020 20:38:00 +0000 (12:38 -0800)
libunwind/src/UnwindLevel1.c

index 3e75b5f13cd6326504b8d22e3145b0a31e24a69e..68e5e48b8c05786213a638388e0eb0b0ba19705b 100644 (file)
@@ -39,8 +39,7 @@ unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except
   __unw_init_local(cursor, uc);
 
   // Walk each frame looking for a place to stop.
-  bool handlerNotFound = true;
-  while (handlerNotFound) {
+  while (true) {
     // Ask libunwind to get next frame (skip over first which is
     // _Unwind_RaiseException).
     int stepResult = __unw_step(cursor);
@@ -102,7 +101,6 @@ unwind_phase1(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except
       case _URC_HANDLER_FOUND:
         // found a catch clause or locals that need destructing in this frame
         // stop search and remember stack pointer at the frame
-        handlerNotFound = false;
         __unw_get_reg(cursor, UNW_REG_SP, &sp);
         exception_object->private_2 = (uintptr_t)sp;
         _LIBUNWIND_TRACE_UNWINDING(