@@ -519,11 +519,11 @@ static void clear_or_reinit_internal_opts(struct merge_options_internal *opti,
519519{
520520 struct rename_info * renames = & opti -> renames ;
521521 int i ;
522- void (* strmap_func )(struct strmap * , int ) =
522+ void (* strmap_clear_func )(struct strmap * , int ) =
523523 reinitialize ? strmap_partial_clear : strmap_clear ;
524- void (* strintmap_func )(struct strintmap * ) =
524+ void (* strintmap_clear_func )(struct strintmap * ) =
525525 reinitialize ? strintmap_partial_clear : strintmap_clear ;
526- void (* strset_func )(struct strset * ) =
526+ void (* strset_clear_func )(struct strset * ) =
527527 reinitialize ? strset_partial_clear : strset_clear ;
528528
529529 /*
@@ -534,14 +534,14 @@ static void clear_or_reinit_internal_opts(struct merge_options_internal *opti,
534534 * to deallocate them.
535535 */
536536 free_strmap_strings (& opti -> paths );
537- strmap_func (& opti -> paths , 1 );
537+ strmap_clear_func (& opti -> paths , 1 );
538538
539539 /*
540540 * All keys and values in opti->conflicted are a subset of those in
541541 * opti->paths. We don't want to deallocate anything twice, so we
542542 * don't free the keys and we pass 0 for free_values.
543543 */
544- strmap_func (& opti -> conflicted , 0 );
544+ strmap_clear_func (& opti -> conflicted , 0 );
545545
546546 /*
547547 * 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,
559559
560560 /* Free memory used by various renames maps */
561561 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 ]);
565565 if (!reinitialize )
566566 assert (renames -> cached_pairs_valid_side == 0 );
567567 if (i != renames -> cached_pairs_valid_side &&
568568 -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 ]);
572572 partial_clear_dir_rename_count (& renames -> dir_rename_count [i ]);
573573 if (!reinitialize )
574574 strmap_clear (& renames -> dir_rename_count [i ], 1 );
575575 }
576576 }
577577 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 );
580580 renames -> deferred [i ].trivial_merges_okay = 1 ; /* 1 == maybe */
581581 }
582582 renames -> cached_pairs_valid_side = 0 ;
0 commit comments