Hans Leidekker : msi: Remove redundant function find_feature_by_name.

Alexandre Julliard julliard at winehq.org
Fri Jun 10 11:16:19 CDT 2011


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Fri Jun 10 10:13:20 2011 +0200

msi: Remove redundant function find_feature_by_name.

---

 dlls/msi/action.c |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index e460465..3f6eae7 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -1081,22 +1081,6 @@ static UINT iterate_load_featurecomponents(MSIRECORD *row, LPVOID param)
     return ERROR_SUCCESS;
 }
 
-static MSIFEATURE *find_feature_by_name( MSIPACKAGE *package, LPCWSTR name )
-{
-    MSIFEATURE *feature;
-
-    if ( !name )
-        return NULL;
-
-    LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
-    {
-        if ( !strcmpW( feature->Feature, name ) )
-            return feature;
-    }
-
-    return NULL;
-}
-
 static UINT load_feature(MSIRECORD * row, LPVOID param)
 {
     MSIPACKAGE* package = param;
@@ -1159,17 +1143,17 @@ static UINT load_feature(MSIRECORD * row, LPVOID param)
 
 static UINT find_feature_children(MSIRECORD * row, LPVOID param)
 {
-    MSIPACKAGE* package = param;
+    MSIPACKAGE *package = param;
     MSIFEATURE *parent, *child;
 
-    child = find_feature_by_name( package, MSI_RecordGetString( row, 1 ) );
+    child = msi_get_loaded_feature( package, MSI_RecordGetString( row, 1 ) );
     if (!child)
         return ERROR_FUNCTION_FAILED;
 
     if (!child->Feature_Parent)
         return ERROR_SUCCESS;
 
-    parent = find_feature_by_name( package, child->Feature_Parent );
+    parent = msi_get_loaded_feature( package, child->Feature_Parent );
     if (!parent)
         return ERROR_FUNCTION_FAILED;
 




More information about the wine-cvs mailing list