Skip to content

Commit

Permalink
http-push: avoid a needless goto
Browse files Browse the repository at this point in the history
There was a goto, and while it is not half as harmful as some people
believe, it was unnecessary here.  So remove it for readability.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Schindelin authored and Junio C Hamano committed Feb 16, 2008
1 parent 1bbeb4c commit 7fea9c5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -2413,12 +2413,9 @@ int main(int argc, char **argv)
} while (request_queue_head && !aborted);

/* Update the remote branch if all went well */
if (aborted || !update_remote(ref->new_sha1, ref_lock)) {
if (aborted || !update_remote(ref->new_sha1, ref_lock))
rc = 1;
goto unlock;
}

unlock:
if (!rc)
fprintf(stderr, " done\n");
unlock_remote(ref_lock);
Expand Down

0 comments on commit 7fea9c5

Please sign in to comment.