From 75c7893797b0ddf33eb8c50f9e04034b465bdb4b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 13 Mar 2006 11:22:51 +0000 Subject: * autoload.cc (LoadDLLfuncNt): New define to wrap NT native functions. Use for NT native functions throughout. * dtable.cc (handle_to_fn): Treate return value of NtQueryObject as NTSTATUS value. --- winsup/cygwin/dtable.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/dtable.cc') diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index c4a8333d5..8996e8587 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -829,9 +829,10 @@ handle_to_fn (HANDLE h, char *posix_fn) ntfn->Name.MaximumLength = sizeof (fnbuf) - sizeof (*ntfn); ntfn->Name.Buffer = (WCHAR *) (ntfn + 1); - DWORD res = NtQueryObject (h, ObjectNameInformation, ntfn, sizeof (fnbuf), NULL); + NTSTATUS res = NtQueryObject (h, ObjectNameInformation, ntfn, sizeof (fnbuf), + NULL); - if (res) + if (NT_SUCCESS (res)) { strcpy (posix_fn, unknown_file); debug_printf ("NtQueryObject failed"); -- cgit v1.2.3