]> git.cworth.org Git - mnemon/blobdiff - mnemon.c
More cleanup of "unsigned vs. signed" integer comparison.
[mnemon] / mnemon.c
index 7b057db25a5c44c18cddd22aa07529951442dbab..ac31422cba7c4eb2f8757e9ed07425250d07ef78 100644 (file)
--- a/mnemon.c
+++ b/mnemon.c
@@ -146,7 +146,7 @@ category_init (category_t *category,
 static void
 category_fini (category_t *category)
 {
 static void
 category_fini (category_t *category)
 {
-    int i;
+    unsigned int i;
 
     for (i = 0; i < category->num_items; i++)
        item_fini (&category->items[i]);
 
     for (i = 0; i < category->num_items; i++)
        item_fini (&category->items[i]);
@@ -191,7 +191,7 @@ category_add_item (category_t       *category,
 static item_t *
 category_next_bin_zero_item (category_t        *category)
 {
 static item_t *
 category_next_bin_zero_item (category_t        *category)
 {
-    int *i = &category->bin_zero_head;
+    unsigned int *i = &category->bin_zero_head;
 
     for ( ; *i < category->num_items; *i = *i + 1)
        if (category->items[*i].score == 0)
 
     for ( ; *i < category->num_items; *i = *i + 1)
        if (category->items[*i].score == 0)
@@ -204,7 +204,7 @@ static void
 category_print (category_t     *category,
                FILE            *file)
 {
 category_print (category_t     *category,
                FILE            *file)
 {
-    int i;
+    unsigned int i;
     item_t *item;
 
     fprintf (file, "order = %s\n\n",
     item_t *item;
 
     fprintf (file, "order = %s\n\n",
@@ -289,7 +289,7 @@ static int
 bin_item_index (bin_t  *bin,
                item_t  *item)
 {
 bin_item_index (bin_t  *bin,
                item_t  *item)
 {
-    int i;
+    unsigned int i;
 
     for (i = 0; i < bin->num_items; i++)
        if (bin->items[i] == item)
 
     for (i = 0; i < bin->num_items; i++)
        if (bin->items[i] == item)