From 0e8c8b009361a87243874b8e576b9326d8ec9ab2 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 23 Jan 2013 14:06:06 +0000 Subject: [PATCH] * miscfuncs.cc (__import_address): On second thought, the chance that this pointer could be NULL is very low so don't bother checking for it. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/miscfuncs.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c7bd6575b..ef1fbab1f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2013-01-23 Christopher Faylor + + * miscfuncs.cc (__import_address): On second thought, the chance that + this pointer could be NULL is very low so don't bother checking for it. + 2013-01-23 Christopher Faylor * exceptions.cc (exception::handle): Make attempt to recursively dump diff --git a/winsup/cygwin/miscfuncs.cc b/winsup/cygwin/miscfuncs.cc index 8e954b39f..4f9c9df9d 100644 --- a/winsup/cygwin/miscfuncs.cc +++ b/winsup/cygwin/miscfuncs.cc @@ -437,7 +437,7 @@ slashify (const char *src, char *dst, bool trailing_slash_p) void * __reg1 __import_address (void *imp) { - if (!imp || *((uint16_t *) imp) != 0x25ff) + if (*((uint16_t *) imp) != 0x25ff) return NULL; myfault efault; if (efault.faulted ())