You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by rl...@apache.org on 2019/07/15 12:08:30 UTC

[celix] branch develop updated: Removed unneeded check for http admin activator

This is an automated email from the ASF dual-hosted git repository.

rlenferink pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/develop by this push:
     new 46e8de4  Removed unneeded check for http admin activator
46e8de4 is described below

commit 46e8de406b90038cf0251f81748f235f8d313503
Author: Roy Lenferink <le...@gmail.com>
AuthorDate: Mon Jul 15 14:08:26 2019 +0200

    Removed unneeded check for http admin activator
    
    Unsigned ints are always bigger than 0
---
 bundles/http_admin/http_admin/src/activator.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bundles/http_admin/http_admin/src/activator.c b/bundles/http_admin/http_admin/src/activator.c
index 97f06a7..49283f7 100644
--- a/bundles/http_admin/http_admin/src/activator.c
+++ b/bundles/http_admin/http_admin/src/activator.c
@@ -188,7 +188,7 @@ static void http_admin_stopBundle(void *data, const celix_bundle_t *bundle) {
 
     //Remove all aliases which are connected to this bundle
     unsigned int size = arrayList_size(act->aliasList);
-    for(unsigned int i = (size - 1); (i >= 0 && i < size); i--) {
+    for (unsigned int i = (size - 1); i < size; i--) {
         http_alias_t *alias = arrayList_get(act->aliasList, i);
         if(alias->bundle_id == bundle_id) {
             remove(alias->alias_path); //Delete alias in cache directory
@@ -282,7 +282,7 @@ static int http_admin_stop(http_admin_activator_t *act, celix_bundle_context_t *
 
     //Destroy alias map by removing symbolic links first.
     unsigned int size = arrayList_size(act->aliasList);
-    for(unsigned int i = (size - 1); (i >= 0 && i < size); i--) {
+    for (unsigned int i = (size - 1); i < size; i--) {
         http_alias_t *alias = arrayList_get(act->aliasList, i);
         remove(alias->alias_path); //Delete alias in cache directory
         free(alias->alias_path);
@@ -297,4 +297,4 @@ static int http_admin_stop(http_admin_activator_t *act, celix_bundle_context_t *
 }
 
 
-CELIX_GEN_BUNDLE_ACTIVATOR(http_admin_activator_t, http_admin_start, http_admin_stop);
\ No newline at end of file
+CELIX_GEN_BUNDLE_ACTIVATOR(http_admin_activator_t, http_admin_start, http_admin_stop);