[newlib-cygwin] Remove redundant check for NULL pointer in cygwin_exception::dump_exception
Corinna Vinschen
corinna@sourceware.org
Thu Nov 24 13:47:00 GMT 2016
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6a6ae087e8ee3645d2ce4d8c45735842eadf9a93
commit 6a6ae087e8ee3645d2ce4d8c45735842eadf9a93
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Thu Nov 24 14:46:57 2016 +0100
Remove redundant check for NULL pointer in cygwin_exception::dump_exception
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/exceptions.cc | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 0f5a890..743c732 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -175,15 +175,12 @@ cygwin_exception::dump_exception ()
{
const char *exception_name = NULL;
- if (e)
+ for (int i = 0; status_info[i].name; i++)
{
- for (int i = 0; status_info[i].name; i++)
+ if (status_info[i].code == (NTSTATUS) e->ExceptionCode)
{
- if (status_info[i].code == (NTSTATUS) e->ExceptionCode)
- {
- exception_name = status_info[i].name;
- break;
- }
+ exception_name = status_info[i].name;
+ break;
}
}
More information about the Cygwin-cvs
mailing list