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,
7070 } else {
7171 /* create mailmap entry */
7272 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 ));
7574 ((struct mailmap_entry * )item -> util )-> namemap .strdup_strings = 1 ;
7675 }
7776 me = (struct mailmap_entry * )map -> items [index ].util ;
@@ -88,7 +87,7 @@ static void add_mapping(struct string_list *map,
8887 me -> email = xstrdup (new_email );
8988 }
9089 } else {
91- struct mailmap_info * mi = xmalloc ( sizeof (struct mailmap_info ));
90+ struct mailmap_info * mi = xcalloc ( 1 , sizeof (struct mailmap_info ));
9291 debug_mm ("mailmap: adding (complex) entry for %s at index %d\n" , old_email , index );
9392 if (new_name )
9493 mi -> name = xstrdup (new_name );
You can’t perform that action at this time.
0 commit comments