Fix the error pointed out by tanoku. Now the code shoulb be c89.
diff --git a/src/tag.c b/src/tag.c
index 8cae17a..b00c925 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -306,6 +306,9 @@ int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *bu
int error;
git_odb_stream *stream;
+ git_reference *new_ref;
+ char ref_name[MAX_GITDIR_TREE_STRUCTURE_PATH_LENGTH];
+
assert(oid && buffer);
memset(&tag, 0, sizeof(tag));
@@ -315,9 +318,6 @@ int git_tag_create_frombuffer(git_oid *oid, git_repository *repo, const char *bu
if ((error = parse_tag_buffer(&tag, buffer, buffer + strlen(buffer))) < GIT_SUCCESS)
return git__rethrow(error, "Failed to create tag");
- git_reference *new_ref;
- char ref_name[MAX_GITDIR_TREE_STRUCTURE_PATH_LENGTH];
-
if ((error = tag_valid_in_odb(&new_ref, ref_name, &tag.target, tag.type, repo, tag.tag_name)) < GIT_SUCCESS)
return git__rethrow(error, "Failed to create tag");