public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Remove redundant check for NULL pointer in cygwin_exception::dump_exception
@ 2016-11-24 13:47 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2016-11-24 13:47 UTC (permalink / raw)
  To: cygwin-cvs

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;
 	}
     }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-24 13:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-24 13:47 [newlib-cygwin] Remove redundant check for NULL pointer in cygwin_exception::dump_exception Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).