aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-11-24 14:46:57 +0100
committerCorinna Vinschen <corinna@vinschen.de>2016-11-24 14:46:57 +0100
commit6a6ae087e8ee3645d2ce4d8c45735842eadf9a93 (patch)
treeee0913d7db92d2d969894d8d34b02688c0824b6c /winsup/cygwin/exceptions.cc
parent284bec317499b1d1f92b82b67d73f4995c9a20c1 (diff)
downloadnewlib-6a6ae087e8ee3645d2ce4d8c45735842eadf9a93.zip
newlib-6a6ae087e8ee3645d2ce4d8c45735842eadf9a93.tar.gz
newlib-6a6ae087e8ee3645d2ce4d8c45735842eadf9a93.tar.bz2
Remove redundant check for NULL pointer in cygwin_exception::dump_exception
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc11
1 files 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;
}
}