diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2016-11-24 14:46:57 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2016-11-24 14:46:57 +0100 |
commit | 6a6ae087e8ee3645d2ce4d8c45735842eadf9a93 (patch) | |
tree | ee0913d7db92d2d969894d8d34b02688c0824b6c | |
parent | 284bec317499b1d1f92b82b67d73f4995c9a20c1 (diff) | |
download | cygnal-6a6ae087e8ee3645d2ce4d8c45735842eadf9a93.tar.gz cygnal-6a6ae087e8ee3645d2ce4d8c45735842eadf9a93.tar.bz2 cygnal-6a6ae087e8ee3645d2ce4d8c45735842eadf9a93.zip |
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.cc | 11 |
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; } } |