@@ -519,11 +519,11 @@ static void clear_or_reinit_internal_opts(struct merge_options_internal *opti,
519
519
{
520
520
struct rename_info * renames = & opti -> renames ;
521
521
int i ;
522
- void (* strmap_func )(struct strmap * , int ) =
522
+ void (* strmap_clear_func )(struct strmap * , int ) =
523
523
reinitialize ? strmap_partial_clear : strmap_clear ;
524
- void (* strintmap_func )(struct strintmap * ) =
524
+ void (* strintmap_clear_func )(struct strintmap * ) =
525
525
reinitialize ? strintmap_partial_clear : strintmap_clear ;
526
- void (* strset_func )(struct strset * ) =
526
+ void (* strset_clear_func )(struct strset * ) =
527
527
reinitialize ? strset_partial_clear : strset_clear ;
528
528
529
529
/*
@@ -534,14 +534,14 @@ static void clear_or_reinit_internal_opts(struct merge_options_internal *opti,
534
534
* to deallocate them.
535
535
*/
536
536
free_strmap_strings (& opti -> paths );
537
- strmap_func (& opti -> paths , 1 );
537
+ strmap_clear_func (& opti -> paths , 1 );
538
538
539
539
/*
540
540
* All keys and values in opti->conflicted are a subset of those in
541
541
* opti->paths. We don't want to deallocate anything twice, so we
542
542
* don't free the keys and we pass 0 for free_values.
543
543
*/
544
- strmap_func (& opti -> conflicted , 0 );
544
+ strmap_clear_func (& opti -> conflicted , 0 );
545
545
546
546
/*
547
547
* opti->paths_to_free is similar to opti->paths; we created it with
@@ -559,24 +559,24 @@ static void clear_or_reinit_internal_opts(struct merge_options_internal *opti,
559
559
560
560
/* Free memory used by various renames maps */
561
561
for (i = MERGE_SIDE1 ; i <= MERGE_SIDE2 ; ++ i ) {
562
- strintmap_func (& renames -> dirs_removed [i ]);
563
- strmap_func (& renames -> dir_renames [i ], 0 );
564
- strintmap_func (& renames -> relevant_sources [i ]);
562
+ strintmap_clear_func (& renames -> dirs_removed [i ]);
563
+ strmap_clear_func (& renames -> dir_renames [i ], 0 );
564
+ strintmap_clear_func (& renames -> relevant_sources [i ]);
565
565
if (!reinitialize )
566
566
assert (renames -> cached_pairs_valid_side == 0 );
567
567
if (i != renames -> cached_pairs_valid_side &&
568
568
-1 != renames -> cached_pairs_valid_side ) {
569
- strset_func (& renames -> cached_target_names [i ]);
570
- strmap_func (& renames -> cached_pairs [i ], 1 );
571
- strset_func (& renames -> cached_irrelevant [i ]);
569
+ strset_clear_func (& renames -> cached_target_names [i ]);
570
+ strmap_clear_func (& renames -> cached_pairs [i ], 1 );
571
+ strset_clear_func (& renames -> cached_irrelevant [i ]);
572
572
partial_clear_dir_rename_count (& renames -> dir_rename_count [i ]);
573
573
if (!reinitialize )
574
574
strmap_clear (& renames -> dir_rename_count [i ], 1 );
575
575
}
576
576
}
577
577
for (i = MERGE_SIDE1 ; i <= MERGE_SIDE2 ; ++ i ) {
578
- strintmap_func (& renames -> deferred [i ].possible_trivial_merges );
579
- strset_func (& renames -> deferred [i ].target_dirs );
578
+ strintmap_clear_func (& renames -> deferred [i ].possible_trivial_merges );
579
+ strset_clear_func (& renames -> deferred [i ].target_dirs );
580
580
renames -> deferred [i ].trivial_merges_okay = 1 ; /* 1 == maybe */
581
581
}
582
582
renames -> cached_pairs_valid_side = 0 ;
0 commit comments