Correct minor style issue in fast-import.
Junio noticed that I was using a different style in fast-import for returned pointers than the rest of Git. Before merging this code into the main git.git tree I'd like to make it consistent, as this style variation was not intentional. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Shawn O. Pearce committed
Feb 6, 2007 at 00:43 UTC
e5b1444b96b842597348d449722ec876432a6530
1 file changed
+17
-17
fast-import.c
+17
-17
@@ -312,7 +312,7 @@ static void alloc_objects(unsigned int cnt)
312
alloc_count += cnt;
313
}
314
315
-static struct object_entry* new_object(unsigned char *sha1)
315
+static struct object_entry *new_object(unsigned char *sha1)
316
{
317
struct object_entry *e;
318
@@ -324,7 +324,7 @@ static struct object_entry* new_object(unsigned char *sha1)
324
return e;
325
}
326
327
-static struct object_entry* find_object(unsigned char *sha1)
327
+static struct object_entry *find_object(unsigned char *sha1)
328
{
329
unsigned int h = sha1[0] << 8 | sha1[1];
330
struct object_entry *e;
@@ -334,7 +334,7 @@ static struct object_entry* find_object(unsigned char *sha1)
334
return NULL;
335
}
336
337
-static struct object_entry* insert_object(unsigned char *sha1)
337
+static struct object_entry *insert_object(unsigned char *sha1)
338
{
339
unsigned int h = sha1[0] << 8 | sha1[1];
340
struct object_entry *e = object_table[h];
@@ -365,7 +365,7 @@ static unsigned int hc_str(const char *s, size_t len)
365
return r;
366
}
367
368
-static void* pool_alloc(size_t len)
368
+static void *pool_alloc(size_t len)
369
{
370
struct mem_pool *p;
371
void *r;
@@ -395,7 +395,7 @@ static void* pool_alloc(size_t len)
395
return r;
396
}
397
398
-static void* pool_calloc(size_t count, size_t size)
398
+static void *pool_calloc(size_t count, size_t size)
399
{
400
size_t len = count * size;
401
void *r = pool_alloc(len);
@@ -403,7 +403,7 @@ static void* pool_calloc(size_t count, size_t size)
403
return r;
404
}
405
406
-static char* pool_strdup(const char *s)
406
+static char *pool_strdup(const char *s)
407
{
408
char *r = pool_alloc(strlen(s) + 1);
409
strcpy(r, s);
@@ -444,7 +444,7 @@ static void insert_mark(uintmax_t idnum, struct object_entry *oe)
444
s->data.marked[idnum] = oe;
445
}
446
447
-static struct object_entry* find_mark(uintmax_t idnum)
447
+static struct object_entry *find_mark(uintmax_t idnum)
448
{
449
uintmax_t orig_idnum = idnum;
450
struct mark_set *s = marks;
@@ -463,7 +463,7 @@ static struct object_entry* find_mark(uintmax_t idnum)
463
return oe;
464
}
465
466
-static struct atom_str* to_atom(const char *s, unsigned short len)
466
+static struct atom_str *to_atom(const char *s, unsigned short len)
467
{
468
unsigned int hc = hc_str(s, len) % atom_table_sz;
469
struct atom_str *c;
@@ -482,7 +482,7 @@ static struct atom_str* to_atom(const char *s, unsigned short len)
482
return c;
483
}
484
485
-static struct branch* lookup_branch(const char *name)
485
+static struct branch *lookup_branch(const char *name)
486
{
487
unsigned int hc = hc_str(name, strlen(name)) % branch_table_sz;
488
struct branch *b;
@@ -493,7 +493,7 @@ static struct branch* lookup_branch(const char *name)
493
return NULL;
494
}
495
496
-static struct branch* new_branch(const char *name)
496
+static struct branch *new_branch(const char *name)
497
{
498
unsigned int hc = hc_str(name, strlen(name)) % branch_table_sz;
499
struct branch* b = lookup_branch(name);
@@ -520,7 +520,7 @@ static unsigned int hc_entries(unsigned int cnt)
520
return cnt < avail_tree_table_sz ? cnt : avail_tree_table_sz - 1;
521
}
522
523
-static struct tree_content* new_tree_content(unsigned int cnt)
523
+static struct tree_content *new_tree_content(unsigned int cnt)
524
{
525
struct avail_tree_content *f, *l = NULL;
526
struct tree_content *t;
@@ -564,7 +564,7 @@ static void release_tree_content_recursive(struct tree_content *t)
564
release_tree_content(t);
565
}
566
567
-static struct tree_content* grow_tree_content(
567
+static struct tree_content *grow_tree_content(
568
struct tree_content *t,
569
int amt)
570
{
@@ -576,7 +576,7 @@ static struct tree_content* grow_tree_content(
576
return r;
577
}
578
579
-static struct tree_entry* new_tree_entry(void)
579
+static struct tree_entry *new_tree_entry(void)
580
{
581
struct tree_entry *e;
582
@@ -676,7 +676,7 @@ static int oecmp (const void *a_, const void *b_)
676
return hashcmp(a->sha1, b->sha1);
677
}
678
679
-static char* create_index(void)
679
+static char *create_index(void)
680
{
681
static char tmpfile[PATH_MAX];
682
SHA_CTX ctx;
@@ -732,7 +732,7 @@ static char* create_index(void)
732
return tmpfile;
733
}
734
735
-static char* keep_pack(char *curr_index_name)
735
+static char *keep_pack(char *curr_index_name)
736
{
737
static char name[PATH_MAX];
738
static char *keep_msg = "fast-import";
@@ -1344,7 +1344,7 @@ static void cmd_mark(void)
1344
next_mark = 0;
1345
}
1346
1347
-static void* cmd_data (size_t *size)
1347
+static void *cmd_data (size_t *size)
1348
{
1349
size_t length;
1350
char *buffer;
@@ -1605,7 +1605,7 @@ static void cmd_from(struct branch *b)
1605
read_next_command();
1606
}
1607
1608
-static struct hash_list* cmd_merge(unsigned int *count)
1608
+static struct hash_list *cmd_merge(unsigned int *count)
1609
{
1610
struct hash_list *list = NULL, *n, *e = e;
1611
const char *from;