Hans Leidekker : msi: Make sure the return value is initialized in save_table (clang).

Alexandre Julliard julliard at winehq.org
Thu Jan 27 12:43:23 CST 2011


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Jan 27 11:55:19 2011 +0100

msi: Make sure the return value is initialized in save_table (clang).

---

 dlls/msi/table.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/table.c b/dlls/msi/table.c
index 90bcb1f..d3675e2 100644
--- a/dlls/msi/table.c
+++ b/dlls/msi/table.c
@@ -766,7 +766,8 @@ static UINT read_table_int(BYTE *const *data, UINT row, UINT col, UINT bytes)
 static UINT save_table( MSIDATABASE *db, const MSITABLE *t, UINT bytes_per_strref )
 {
     BYTE *rawdata = NULL;
-    UINT rawsize, r, i, j, row_size, row_count;
+    UINT rawsize, i, j, row_size, row_count;
+    UINT r = ERROR_FUNCTION_FAILED;
 
     /* Nothing to do for non-persistent tables */
     if( t->persistent == MSICONDITION_FALSE )
@@ -816,7 +817,6 @@ static UINT save_table( MSIDATABASE *db, const MSITABLE *t, UINT bytes_per_strre
                 if (id > 1 << bytes_per_strref * 8)
                 {
                     ERR("string id %u out of range\n", id);
-                    r = ERROR_FUNCTION_FAILED;
                     goto err;
                 }
             }




More information about the wine-cvs mailing list