OSDN Git Service

http-push.c::add_send_request(): do not initialize transfer_request
authorStefan Beller <stefanbeller@googlemail.com>
Thu, 18 Jul 2013 21:35:26 +0000 (23:35 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jul 2013 18:15:17 +0000 (11:15 -0700)
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>
http-push.c

index 395a8cf..6dad188 100644 (file)
@@ -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 */