Module: wine Branch: master Commit: 6a95b93ec3abcea468397217822df29d5cda19f4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6a95b93ec3abcea46839721782...
Author: Detlef Riekenberg wine.dev@web.de Date: Mon Jul 9 19:38:59 2007 +0200
advpack+setupapi: Remove unneeded checks before SetupCloseInfFile.
---
dlls/advpack/install.c | 3 +-- dlls/setupapi/tests/parser.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/advpack/install.c b/dlls/advpack/install.c index b7e997c..c5a5df0 100644 --- a/dlls/advpack/install.c +++ b/dlls/advpack/install.c @@ -512,8 +512,7 @@ static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec, /* release the install instance information */ static void install_release(const ADVInfo *info) { - if (info->hinf && info->hinf != INVALID_HANDLE_VALUE) - SetupCloseInfFile(info->hinf); + SetupCloseInfFile(info->hinf);
HeapFree(GetProcessHeap(), 0, info->inf_path); HeapFree(GetProcessHeap(), 0, info->inf_filename); diff --git a/dlls/setupapi/tests/parser.c b/dlls/setupapi/tests/parser.c index 2585f6d..2aaaa5e 100644 --- a/dlls/setupapi/tests/parser.c +++ b/dlls/setupapi/tests/parser.c @@ -167,7 +167,7 @@ static void test_invalid_files(void) ok( hinf != INVALID_HANDLE_VALUE, "file %u: Open failed\n", i ); ok( err == 0, "file %u: Error code set to %u\n", i, err ); } - if (hinf != INVALID_HANDLE_VALUE) SetupCloseInfFile( hinf ); + SetupCloseInfFile( hinf ); } }