aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-09-28 20:20:57 +0000
committerChristopher Faylor <me@cgf.cx>2005-09-28 20:20:57 +0000
commit503490bb9fd3b8853342128a7961d9f4b9e15d99 (patch)
tree28f7700d73ed3701ef4926b8560adb8054489c66
parentf098767559e00c93c86060b4e0894484b7d7dd67 (diff)
downloadnewlib-503490bb9fd3b8853342128a7961d9f4b9e15d99.zip
newlib-503490bb9fd3b8853342128a7961d9f4b9e15d99.tar.gz
newlib-503490bb9fd3b8853342128a7961d9f4b9e15d99.tar.bz2
* hookapi.cc (hook_or_detect_cygwin): Correct inverted test for whether to
allocate a buffer by always allocating a buffer.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/hookapi.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 8e742fa..2667ad1 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2005-09-28 Christopher Faylor <cgf@timesys.com>
+
+ * hookapi.cc (hook_or_detect_cygwin): Correct inverted test for whether
+ to allocate a buffer by always allocating a buffer.
+
2005-09-28 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (class fhandler_dev_raw): Delete current_position and
diff --git a/winsup/cygwin/hookapi.cc b/winsup/cygwin/hookapi.cc
index 8539d2a..29a9889 100644
--- a/winsup/cygwin/hookapi.cc
+++ b/winsup/cygwin/hookapi.cc
@@ -185,7 +185,7 @@ hook_or_detect_cygwin (const char *name, const void *fn)
function_hook fh;
fh.origfn = NULL;
fh.hookfn = fn;
- char *buf = fn ? NULL : (char *) alloca (strlen (name) + sizeof ("_64"));
+ char *buf = (char *) alloca (strlen (name) + sizeof ("_64"));
int i;
// Iterate through each import descriptor, and redirect if appropriate
for (PIMAGE_IMPORT_DESCRIPTOR pd = pdfirst; pd->FirstThunk; pd++)