diff options
| author | Vicent Martà <vicent@github.com> | 2012-12-19 10:26:54 -0800 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2012-12-19 10:26:54 -0800 |
| commit | 0f7f1b1baea2958e2f8c227c5b5c3a3894483a53 (patch) | |
| tree | 779adbdb71435989ca4f79109ddba06a39b929fd /src | |
| parent | f7a40a82b0f530e08e0d9619f1b4fe91a6f19793 (diff) | |
| parent | 9ec50c25a83163d5971d1c96f1bd34af481433e5 (diff) | |
| download | libgit2-0f7f1b1baea2958e2f8c227c5b5c3a3894483a53.tar.gz | |
Merge pull request #1159 from rick/be-consistent-be-be-consistent
Make `goto cleanup` more consistent
Diffstat (limited to 'src')
| -rw-r--r-- | src/reflog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/reflog.c b/src/reflog.c index 275622997..1bdd74bdc 100644 --- a/src/reflog.c +++ b/src/reflog.c @@ -348,14 +348,14 @@ int git_reflog_rename(git_reference *ref, const char *new_name) assert(ref && new_name); - if ((error = git_reference__normalize_name( + if ((git_reference__normalize_name( &normalized, new_name, GIT_REF_FORMAT_ALLOW_ONELEVEL)) < 0) - goto cleanup; + return -1; error = -1; if (git_buf_joinpath(&temp_path, git_reference_owner(ref)->path_repository, GIT_REFLOG_DIR) < 0) - return -1; + goto cleanup; if (git_buf_joinpath(&old_path, git_buf_cstr(&temp_path), ref->name) < 0) goto cleanup; |
