[vlc-commits] input: use size_t

Thomas Guillem git at videolan.org
Wed Sep 20 16:57:18 CEST 2017


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

input: use size_t

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

 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 5c16f70caf..7ff57304d5 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -420,7 +420,7 @@ struct 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 29fa3a7a6a..c4b3d03eef 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1500,7 +1500,7 @@ static int rdh_should_match_idx(struct 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 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 readdir_helper_finish(struct 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