sparse fixes for http-{fetch,push}.c
Make a bunch of needlessly global functions static, and replace two K&R-style declarations. Signed-off-by: Peter Hagervall <hager@cs.umu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
Peter Hagervall committed
Nov 8, 2005 at 23:18 UTC
f4f440a039587c14ca29a8fe127b4d5273eacafc
2 files changed
+15
-15
http-fetch.c
+2
-2
@@ -569,7 +569,7 @@ static void release_request(struct transfer_request *request)
569
}
570
571
#ifdef USE_CURL_MULTI
572
-void process_curl_messages(void)
572
+static void process_curl_messages(void)
573
{
574
int num_messages;
575
struct active_request_slot *slot;
@@ -625,7 +625,7 @@ void process_curl_messages(void)
625
}
626
}
627
628
-void process_request_queue(void)
628
+static void process_request_queue(void)
629
{
630
struct transfer_request *request = request_queue_head;
631
struct active_request_slot *slot = active_queue_head;
http-push.c
+13
-13
@@ -595,7 +595,7 @@ static void start_move(struct transfer_request *request)
595
}
596
}
597
598
-int refresh_lock(struct active_lock *lock)
598
+static int refresh_lock(struct active_lock *lock)
599
{
600
struct active_request_slot *slot;
601
char *if_header;
@@ -726,7 +726,7 @@ static void release_request(struct transfer_request *request)
726
}
727
728
#ifdef USE_CURL_MULTI
729
-void process_curl_messages(void)
729
+static void process_curl_messages(void)
730
{
731
int num_messages;
732
struct active_request_slot *slot;
@@ -766,7 +766,7 @@ void process_curl_messages(void)
766
}
767
}
768
769
-void process_request_queue(void)
769
+static void process_request_queue(void)
770
{
771
struct transfer_request *request = request_queue_head;
772
struct active_request_slot *slot = active_queue_head;
@@ -799,7 +799,7 @@ void process_request_queue(void)
799
}
800
#endif
801
802
-void process_waiting_requests(void)
802
+static void process_waiting_requests(void)
803
{
804
struct active_request_slot *slot = active_queue_head;
805
@@ -812,7 +812,7 @@ void process_waiting_requests(void)
812
}
813
}
814
815
-void add_request(unsigned char *sha1, struct active_lock *lock)
815
+static void add_request(unsigned char *sha1, struct active_lock *lock)
816
{
817
struct transfer_request *request = request_queue_head;
818
struct packed_git *target;
@@ -939,7 +939,7 @@ static int setup_index(unsigned char *sha1)
939
return 0;
940
}
941
942
-static int fetch_indices()
942
+static int fetch_indices(void)
943
{
944
unsigned char sha1[20];
945
char *url;
@@ -1189,7 +1189,7 @@ end_lockprop_element(void *userData, const char *name)
1189
}
1190
}
1191
1192
-struct active_lock *lock_remote(char *file, long timeout)
1192
+static struct active_lock *lock_remote(char *file, long timeout)
1193
{
1194
struct active_request_slot *slot;
1195
struct buffer out_buffer;
@@ -1318,7 +1318,7 @@ struct active_lock *lock_remote(char *file, long timeout)
1318
return new_lock;
1319
}
1320
1321
-int unlock_remote(struct active_lock *lock)
1321
+static int unlock_remote(struct active_lock *lock)
1322
{
1323
struct active_request_slot *slot;
1324
char *lock_token_header;
@@ -1359,7 +1359,7 @@ int unlock_remote(struct active_lock *lock)
1359
return rc;
1360
}
1361
1362
-int check_locking()
1362
+static int check_locking(void)
1363
{
1364
struct active_request_slot *slot;
1365
struct buffer in_buffer;
@@ -1425,7 +1425,7 @@ int check_locking()
1425
return 1;
1426
}
1427
1428
-int is_ancestor(unsigned char *sha1, struct commit *commit)
1428
+static int is_ancestor(unsigned char *sha1, struct commit *commit)
1429
{
1430
struct commit_list *parents;
1431
@@ -1446,8 +1446,8 @@ int is_ancestor(unsigned char *sha1, struct commit *commit)
1446
return 0;
1447
}
1448
1449
-void get_delta(unsigned char *sha1, struct object *obj,
1450
- struct active_lock *lock)
1449
+static void get_delta(unsigned char *sha1, struct object *obj,
1450
+ struct active_lock *lock)
1451
{
1452
struct commit *commit;
1453
struct commit_list *parents;
@@ -1503,7 +1503,7 @@ void get_delta(unsigned char *sha1, struct object *obj,
1503
}
1504
}
1505
1506
-int update_remote(unsigned char *sha1, struct active_lock *lock)
1506
+static int update_remote(unsigned char *sha1, struct active_lock *lock)
1507
{
1508
struct active_request_slot *slot;
1509
char *out_data;