lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [1/2] lucy-clownfish git commit: Fix incorrect (`i` vs. `j`) iteration variable.
Date Sun, 20 Mar 2016 04:41:24 GMT
Repository: lucy-clownfish
Updated Branches:
  refs/heads/master f3bab0eec -> b8d40d0ef


Fix incorrect (`i` vs. `j`) iteration variable.

This latent bug would have affected Clownfish packages with multiple
dependencies.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/d352cc9a
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/d352cc9a
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/d352cc9a

Branch: refs/heads/master
Commit: d352cc9acf36af4d28c0522dcbd22438af339112
Parents: f3bab0e
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Wed Mar 16 01:03:14 2016 +0000
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Sat Mar 19 21:37:11 2016 -0700

----------------------------------------------------------------------
 compiler/src/CFCGo.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d352cc9a/compiler/src/CFCGo.c
----------------------------------------------------------------------
diff --git a/compiler/src/CFCGo.c b/compiler/src/CFCGo.c
index 45e9e3f..c263bfd 100644
--- a/compiler/src/CFCGo.c
+++ b/compiler/src/CFCGo.c
@@ -46,7 +46,7 @@ struct mapping {
     char *package;
 };
 
-static int num_parcel_mappings;
+static size_t num_parcel_mappings;
 static struct mapping *parcel_mappings;
 
 struct CFCGo {
@@ -198,9 +198,9 @@ S_gen_prereq_imports(CFCParcel *parcel) {
     for (int i = 0; prereqs[i] != NULL; i++) {
         const char *dep_parcel = CFCParcel_get_name(prereqs[i]);
         const char *dep_package = NULL;
-        for (int j = 0; j < num_parcel_mappings; j++) {
-            if (strcmp(dep_parcel, parcel_mappings[i].parcel) == 0) {
-                dep_package = parcel_mappings[i].package;
+        for (size_t j = 0; j < num_parcel_mappings; j++) {
+            if (strcmp(dep_parcel, parcel_mappings[j].parcel) == 0) {
+                dep_package = parcel_mappings[j].package;
             }
         }
         if (dep_package == NULL) {


Mime
View raw message