Skip to content

Commit 1d4bec9

Browse files
Fix compatibility with C89.
1 parent cc60001 commit 1d4bec9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/rugged/rugged_commit.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ static VALUE rb_git_commit_trailers_GET(VALUE self)
6666
git_message_trailer_array arr;
6767
VALUE trailers = rb_ary_new();
6868
int error;
69+
size_t i;
6970

7071
Data_Get_Struct(self, git_commit, commit);
7172

@@ -78,7 +79,7 @@ static VALUE rb_git_commit_trailers_GET(VALUE self)
7879
error = git_message_trailers(&arr, message);
7980
rugged_exception_check(error);
8081

81-
for(size_t i=0; i<arr.count; i++) {
82+
for(i = 0; i < arr.count; i++) {
8283
VALUE pair = rb_ary_new();
8384
const char *key = arr.trailers[i].key;
8485
const char *value = arr.trailers[i].value;

0 commit comments

Comments
 (0)