[PATCH] Revert "msi: Check for return value of GetUserName (Coverity)."

Marcus Meissner marcus at jet.franken.de
Thu Sep 8 00:51:16 CDT 2011


This reverts commit ac0a7b644fa464fa640e06a6e26b2191b5a29a92.

GetUserName is supposed to return 0 here, as size is 0.

Bug 28313

Sorry :/
---
 dlls/msi/package.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index bec7627..1025607 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -501,8 +501,7 @@ static UINT set_user_sid_prop( MSIPACKAGE *package )
     UINT r = ERROR_FUNCTION_FAILED;
 
     size = 0;
-    if (!GetUserNameW( NULL, &size ))
-	return r;
+    GetUserNameW( NULL, &size );
 
     user_name = msi_alloc( (size + 1) * sizeof(WCHAR) );
     if (!user_name)
-- 
1.7.3.4




More information about the wine-patches mailing list