[vlc-commits] input: use size_t

Thomas Guillem git at videolan.org
Wed Sep 20 17:38:34 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Sep 20 11:57:51 2017 +0200| [13eb6c56f98b0b377d780b578d95520c52d5bc99] | committer: Thomas Guillem

input: use size_t

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=13eb6c56f98b0b377d780b578d95520c52d5bc99
---

 include/vlc_input_item.h | 2 +-
 src/input/item.c         | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
index c91b284fbe..3231c6ed01 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -420,7 +420,7 @@ struct vlc_readdir_helper
 {
     input_item_node_t *p_node;
     void **pp_slaves;
-    unsigned int i_slaves;
+    size_t i_slaves;
     int i_sub_autodetect_fuzzy;
     bool b_show_hiddenfiles;
     char *psz_ignored_exts;
diff --git a/src/input/item.c b/src/input/item.c
index 9b2be7286e..cf56ce98f7 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1500,7 +1500,7 @@ static int rdh_should_match_idx(struct vlc_readdir_helper *p_rdh,
     if (strcasecmp(psz_ext, "sub") != 0)
         return false;
 
-    for (unsigned int i = 0; i < p_rdh->i_slaves; i++)
+    for (size_t i = 0; i < p_rdh->i_slaves; i++)
     {
         struct rdh_slave *p_rdh_slave = p_rdh->pp_slaves[i];
 
@@ -1539,7 +1539,7 @@ static void rdh_attach_slaves(struct vlc_readdir_helper *p_rdh)
         input_item_node_t *p_node = p_rdh->p_node->pp_children[i];
         input_item_t *p_item = p_node->p_item;
 
-        for (unsigned int j = 0; j < p_rdh->i_slaves; j++)
+        for (size_t j = 0; j < p_rdh->i_slaves; j++)
         {
             struct rdh_slave *p_rdh_slave = p_rdh->pp_slaves[j];
 
@@ -1612,7 +1612,7 @@ void vlc_readdir_helper_finish(struct vlc_readdir_helper *p_rdh, bool b_success)
     free(p_rdh->psz_ignored_exts);
 
     /* Remove unmatched slaves */
-    for (unsigned int i = 0; i < p_rdh->i_slaves; i++)
+    for (size_t i = 0; i < p_rdh->i_slaves; i++)
     {
         struct rdh_slave *p_rdh_slave = p_rdh->pp_slaves[i];
         if (p_rdh_slave != NULL)



More information about the vlc-commits mailing list