diff options
author | Rick Bradley <rick@rickbradley.com> | 2012-12-18 18:15:21 -0600 |
---|---|---|
committer | Rick Bradley <rick@rickbradley.com> | 2012-12-18 18:15:21 -0600 |
commit | 9ec50c25a83163d5971d1c96f1bd34af481433e5 (patch) | |
tree | d7ceb8dab44f1184633af060cd45dc75aa557d15 /src/reflog.c | |
parent | 9d8fa5379942e6dded14a9df053a69ebba136056 (diff) | |
download | libgit2-9ec50c25a83163d5971d1c96f1bd34af481433e5.tar.gz |
Make goto cleanup more consistent
There may be some question about whether this is likely to be needed
at all, but that's above my head at the moment.
Diffstat (limited to 'src/reflog.c')
-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; |