summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Glesser <glesserd@ensimag.fr>2011-06-07 10:15:31 +0200
committerDavid Glesser <glesserd@ensimag.fr>2011-06-07 10:15:31 +0200
commit1c68d27d07a03b874e98f0c8eccfc7602f948567 (patch)
tree1e7cf9c1d089d2ee7817a9f3afb3c017469b950b
parentf4c925c51449f5e9b141c4f07c7d61212e1b0a4a (diff)
downloadlibgit2-1c68d27d07a03b874e98f0c8eccfc7602f948567.tar.gz
Fix the error pointed out by tanoku.
Now the code shoulb be c89.
-rw-r--r--src/tag.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tag.c b/src/tag.c
index 8cae17a42..b00c92520 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");