Skip to content

Commit

Permalink
http-push.c::add_send_request(): do not initialize transfer_request
Browse files Browse the repository at this point in the history
That pointer will be assigned to new memory via

    request = xmalloc(sizeof(*request));

20 lines later unconditionally anyway, so it's safe to not assign it
to an arbitrary variable.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Stefan Beller authored and Junio C Hamano committed Jul 19, 2013
1 parent 98aa2ea commit 3def06e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ static void add_fetch_request(struct object *obj)

static int add_send_request(struct object *obj, struct remote_lock *lock)
{
struct transfer_request *request = request_queue_head;
struct transfer_request *request;
struct packed_git *target;

/* Keep locks active */
Expand Down

0 comments on commit 3def06e

Please sign in to comment.