use commit_list_count() to count the members of commit_lists
[gitweb.git] / builtin / blame.c
index d3b256e545a76b096682223539c4faec8d770b2f..75b3a028a729f2fa447d8c0d81e21c08ba25977d 100644 (file)
@@ -1371,11 +1371,8 @@ static struct commit_list *first_scapegoat(struct rev_info *revs, struct commit
 
 static int num_scapegoats(struct rev_info *revs, struct commit *commit)
 {
-       int cnt;
        struct commit_list *l = first_scapegoat(revs, commit);
-       for (cnt = 0; l; l = l->next)
-               cnt++;
-       return cnt;
+       return commit_list_count(l);
 }
 
 /* Distribute collected unsorted blames to the respected sorted lists