Hans Leidekker : msi: Remove unused and redundant name field from STREAM structure.

Alexandre Julliard julliard at winehq.org
Thu Feb 4 11:11:02 CST 2010


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Feb  4 10:00:24 2010 +0100

msi: Remove unused and redundant name field from STREAM structure.

---

 dlls/msi/streams.c |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/dlls/msi/streams.c b/dlls/msi/streams.c
index 92de01b..21357cd 100644
--- a/dlls/msi/streams.c
+++ b/dlls/msi/streams.c
@@ -41,7 +41,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msidb);
 typedef struct tabSTREAM
 {
     UINT str_index;
-    LPWSTR name;
     IStream *stream;
 } STREAM;
 
@@ -72,7 +71,6 @@ static STREAM *create_stream(MSISTREAMSVIEW *sv, LPWSTR name, BOOL encoded, IStr
 {
     STREAM *stream;
     WCHAR decoded[MAX_STREAM_NAME_LEN];
-    LPWSTR ptr = name;
 
     stream = msi_alloc(sizeof(STREAM));
     if (!stream)
@@ -81,18 +79,11 @@ static STREAM *create_stream(MSISTREAMSVIEW *sv, LPWSTR name, BOOL encoded, IStr
     if (encoded)
     {
         decode_streamname(name, decoded);
-        ptr = decoded;
         TRACE("stream -> %s %s\n", debugstr_w(name), debugstr_w(decoded));
+        name = decoded;
     }
 
-    stream->name = strdupW(ptr);
-    if (!stream->name)
-    {
-        msi_free(stream);
-        return NULL;
-    }
-
-    stream->str_index = msi_addstringW(sv->db->strings, 0, stream->name, -1, 1, StringNonPersistent);
+    stream->str_index = msi_addstringW(sv->db->strings, 0, name, -1, 1, StringNonPersistent);
     stream->stream = stm;
     return stream;
 }
@@ -404,8 +395,6 @@ static UINT STREAMS_delete(struct tagMSIVIEW *view)
         {
             if (sv->streams[i]->stream)
                 IStream_Release(sv->streams[i]->stream);
-
-            msi_free(sv->streams[i]->name);
             msi_free(sv->streams[i]);
         }
     }




More information about the wine-cvs mailing list