Commit 1c68d27d by David Glesser

Fix the error pointed out by tanoku.

Now the code shoulb be c89.
parent f4c925c5
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment