File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -70,8 +70,7 @@ static void add_mapping(struct string_list *map,
70
70
} else {
71
71
/* create mailmap entry */
72
72
struct string_list_item * item = string_list_insert_at_index (map , index , old_email );
73
- item -> util = xmalloc (sizeof (struct mailmap_entry ));
74
- memset (item -> util , 0 , sizeof (struct mailmap_entry ));
73
+ item -> util = xcalloc (1 , sizeof (struct mailmap_entry ));
75
74
((struct mailmap_entry * )item -> util )-> namemap .strdup_strings = 1 ;
76
75
}
77
76
me = (struct mailmap_entry * )map -> items [index ].util ;
@@ -88,7 +87,7 @@ static void add_mapping(struct string_list *map,
88
87
me -> email = xstrdup (new_email );
89
88
}
90
89
} else {
91
- struct mailmap_info * mi = xmalloc ( sizeof (struct mailmap_info ));
90
+ struct mailmap_info * mi = xcalloc ( 1 , sizeof (struct mailmap_info ));
92
91
debug_mm ("mailmap: adding (complex) entry for %s at index %d\n" , old_email , index );
93
92
if (new_name )
94
93
mi -> name = xstrdup (new_name );
You can’t perform that action at this time.
0 commit comments