Author: compnerd Date: Wed Sep 18 09:15:56 2019 New Revision: 372233 URL: http://llvm.org/viewvc/llvm-project?rev=372233&view=rev Log: unwind: remove a could of extraneous `else` (NFC)
Simplify `if return else return` by removing the unnecessary `else`. Modified: libunwind/trunk/src/libunwind.cpp Modified: libunwind/trunk/src/libunwind.cpp URL: http://llvm.org/viewvc/llvm-project/libunwind/trunk/src/libunwind.cpp?rev=372233&r1=372232&r2=372233&view=diff ============================================================================== --- libunwind/trunk/src/libunwind.cpp (original) +++ libunwind/trunk/src/libunwind.cpp Wed Sep 18 09:15:56 2019 @@ -171,8 +171,7 @@ _LIBUNWIND_HIDDEN int __unw_get_proc_inf co->getInfo(info); if (info->end_ip == 0) return UNW_ENOINFO; - else - return UNW_ESUCCESS; + return UNW_ESUCCESS; } _LIBUNWIND_WEAK_ALIAS(__unw_get_proc_info, unw_get_proc_info) @@ -194,8 +193,7 @@ _LIBUNWIND_HIDDEN int __unw_get_proc_nam AbstractUnwindCursor *co = (AbstractUnwindCursor *)cursor; if (co->getFunctionName(buf, bufLen, offset)) return UNW_ESUCCESS; - else - return UNW_EUNSPEC; + return UNW_EUNSPEC; } _LIBUNWIND_WEAK_ALIAS(__unw_get_proc_name, unw_get_proc_name) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits