celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnol...@apache.org
Subject celix git commit: CELIX-452: Removes an erroneous if statement.
Date Wed, 18 Jul 2018 05:53:21 GMT
Repository: celix
Updated Branches:
  refs/heads/develop ba03fb885 -> 66f89bb7c


CELIX-452: Removes an erroneous if statement.


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/66f89bb7
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/66f89bb7
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/66f89bb7

Branch: refs/heads/develop
Commit: 66f89bb7c3312e528db2def4ee52893c4dc28fd5
Parents: ba03fb8
Author: Pepijn Noltes <pepijnnoltes@gmail.com>
Authored: Wed Jul 18 07:52:29 2018 +0200
Committer: Pepijn Noltes <pepijnnoltes@gmail.com>
Committed: Wed Jul 18 07:52:29 2018 +0200

----------------------------------------------------------------------
 libs/framework/src/service_tracker.c | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/66f89bb7/libs/framework/src/service_tracker.c
----------------------------------------------------------------------
diff --git a/libs/framework/src/service_tracker.c b/libs/framework/src/service_tracker.c
index 87dff42..93b3365 100644
--- a/libs/framework/src/service_tracker.c
+++ b/libs/framework/src/service_tracker.c
@@ -535,17 +535,15 @@ static void serviceTracker_checkAndInvokeSetService(void *handle, void
*highestS
 
 static celix_status_t serviceTracker_invokeModifiedService(celix_service_tracker_instance_t
*instance, celix_tracked_entry_t *tracked) {
     celix_status_t status = CELIX_SUCCESS;
-    if (&instance->customizer != NULL) {
-        void *handle = NULL;
-        modified_callback_pt function = NULL;
 
-        serviceTrackerCustomizer_getHandle(&instance->customizer, &handle);
-        serviceTrackerCustomizer_getModifiedFunction(&instance->customizer, &function);
-
-        if (function != NULL) {
-            function(handle, tracked->reference, tracked->service);
-        }
+    void *customizerHandle = NULL;
+    modified_callback_pt function = NULL;
+    serviceTrackerCustomizer_getHandle(&instance->customizer, &customizerHandle);
+    serviceTrackerCustomizer_getModifiedFunction(&instance->customizer, &function);
+    if (function != NULL) {
+        function(customizerHandle, tracked->reference, tracked->service);
     }
+    
     void *handle = instance->callbackHandle;
     if (instance->modified != NULL) {
         instance->modified(handle, tracked->service);
@@ -969,4 +967,4 @@ static void serviceTracker_remInstanceFromShutdownList(celix_service_tracker_ins
         celixThreadCondition_broadcast(&g_cond);
     }
     celixThreadMutex_unlock(&g_mutex);
-}
\ No newline at end of file
+}


Mime
View raw message