From: Christopher Faylor Date: Thu, 21 Feb 2002 06:44:05 +0000 (+0000) Subject: * win32-nat.c (register_loaded_dll): Correctly check for invalid handle value. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=097f6b0bbaff5af8a376eba6a115819f885318ed;p=binutils-gdb.git * win32-nat.c (register_loaded_dll): Correctly check for invalid handle value. --- 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);