dlls/msi/streams.c -- simplify and constify
Gerald Pfeifer
gerald at pfeifer.com
Sat Nov 3 13:10:03 CDT 2007
While removing the dead code I noticed that we can actually also
strengthen the const-ness of this function.
Gerald
ChangeLog:
Remove a check which never could trigger (due to the domain of the
variable in question) and increase const-ness of STREAMS_CreateView().
Index: dlls/msi/streams.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/streams.c,v
retrieving revision 1.7
diff -u -3 -p -r1.7 streams.c
--- dlls/msi/streams.c 18 Oct 2007 13:00:57 -0000 1.7
+++ dlls/msi/streams.c 3 Nov 2007 18:06:27 -0000
@@ -430,7 +430,7 @@ static UINT add_streams_to_table(MSISTRE
return count;
}
-UINT STREAMS_CreateView(MSIDATABASE *db, MSIVIEW **view)
+UINT STREAMS_CreateView(const MSIDATABASE *db, MSIVIEW **view)
{
MSISTREAMSVIEW *sv;
@@ -444,9 +444,6 @@ UINT STREAMS_CreateView(MSIDATABASE *db,
sv->db = db;
sv->num_rows = add_streams_to_table(sv);
- if (sv->num_rows < 0)
- return ERROR_FUNCTION_FAILED;
-
*view = (MSIVIEW *)sv;
return ERROR_SUCCESS;
More information about the wine-patches
mailing list