From 097f6b0bbaff5af8a376eba6a115819f885318ed Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 21 Feb 2002 06:44:05 +0000 Subject: [PATCH] * win32-nat.c (register_loaded_dll): Correctly check for invalid handle value. --- gdb/ChangeLog | 5 +++++ gdb/win32-nat.c | 2 +- gdb/windows-nat.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e6cb3a0f5c3..551ccbdfd4f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-02-21 Christopher Faylor + + * win32-nat.c (register_loaded_dll): Correctly check for invalid handle + value. + 2002-02-20 Christopher Faylor * win32-nat.c (register_loaded_dll): Handle case where FindFirstFile diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index 871620fe386..cd288be2c74 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -582,7 +582,7 @@ register_loaded_dll (const char *name, DWORD load_addr) HANDLE h = FindFirstFile(name, &w32_fd); size_t len; - if (h) + if (h != INVALID_HANDLE_VALUE) { FindClose (h); strcpy (buf, name); diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 871620fe386..cd288be2c74 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -582,7 +582,7 @@ register_loaded_dll (const char *name, DWORD load_addr) HANDLE h = FindFirstFile(name, &w32_fd); size_t len; - if (h) + if (h != INVALID_HANDLE_VALUE) { FindClose (h); strcpy (buf, name); -- 2.30.2