Skip to content

Commit e849be6

Browse files
committed
move declaration to the top of the method
1 parent a3ba51f commit e849be6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/rugged/rugged.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,10 @@ static VALUE rb_git_features(VALUE self)
121121
static VALUE rb_git_valid_full_oid(VALUE self, VALUE hex)
122122
{
123123
git_oid oid;
124+
int errorcode;
124125

125126
Check_Type(hex, T_STRING);
126-
int errorcode = git_oid_fromstr(&oid, StringValueCStr(hex));
127+
errorcode = git_oid_fromstr(&oid, StringValueCStr(hex));
127128
if (errorcode < 0) {
128129
return Qfalse;
129130
} else {

0 commit comments

Comments
 (0)