Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-11-24 16:46:57 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-11-24 16:46:57 +0300
commit6a6ae087e8ee3645d2ce4d8c45735842eadf9a93 (patch)
treeee0913d7db92d2d969894d8d34b02688c0824b6c
parent284bec317499b1d1f92b82b67d73f4995c9a20c1 (diff)
Remove redundant check for NULL pointer in cygwin_exception::dump_exception
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-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 0f5a890b6..743c73200 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;
}
}