Vincent Povirk : cabinet: Accept hf == 0 in FDIIsCabinet.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Dec 3 15:43:24 CST 2014


Module: wine
Branch: master
Commit: c97da4c944743b1f6871cb2e8db0651b8cbabb13
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c97da4c944743b1f6871cb2e8db0651b8cbabb13

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Tue Dec  2 16:28:59 2014 -0600

cabinet: Accept hf == 0 in FDIIsCabinet.

---

 dlls/cabinet/fdi.c       | 5 -----
 dlls/cabinet/tests/fdi.c | 2 --
 2 files changed, 7 deletions(-)

diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c
index ae0576b..aedd972 100644
--- a/dlls/cabinet/fdi.c
+++ b/dlls/cabinet/fdi.c
@@ -702,11 +702,6 @@ BOOL __cdecl FDIIsCabinet(HFDI hfdi, INT_PTR hf, PFDICABINETINFO pfdici)
 
   if (!fdi) return FALSE;
 
-  if (!hf) {
-    SetLastError(ERROR_INVALID_HANDLE);
-    return FALSE;
-  }
-
   if (!pfdici) {
     SetLastError(ERROR_BAD_ARGUMENTS);
     return FALSE;
diff --git a/dlls/cabinet/tests/fdi.c b/dlls/cabinet/tests/fdi.c
index fe9a2e3..b5bec38 100644
--- a/dlls/cabinet/tests/fdi.c
+++ b/dlls/cabinet/tests/fdi.c
@@ -727,14 +727,12 @@ static void test_FDIIsCabinet(void)
     ZeroMemory(&cabinfo, sizeof(FDICABINETINFO));
     SetLastError(0xdeadbeef);
     ret = FDIIsCabinet(hfdi, 0, &cabinfo);
-todo_wine {
     ok(ret == TRUE, "Expected TRUE, got %d\n", ret);
     ok(GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %d\n", GetLastError());
     ok(cabinfo.cFiles == 4, "Expected 4, got %d\n", cabinfo.cFiles);
     ok(cabinfo.cFolders == 1, "Expected 1, got %d\n", cabinfo.cFolders);
     ok(cabinfo.setID == 0xbeef, "Expected 0xbeef, got %d\n", cabinfo.setID);
     ok(cabinfo.cbCabinet == 182, "Expected 182, got %d\n", cabinfo.cbCabinet);
-}
     ok(cabinfo.iCabinet == 0, "Expected 0, got %d\n", cabinfo.iCabinet);
 
     fdi_close(static_fdi_handle);




More information about the wine-cvs mailing list