diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-13 21:12:14 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-13 21:12:14 -0800 |
commit | 6d1cdadbeeb03f40250526e29b1f1a91582911d8 (patch) | |
tree | 6d829c82ee1c03e29d723bc81113f8452bbbe294 | |
parent | c3ea051544cb1d98a5ae7f64d077084a9a5db5c1 (diff) | |
parent | 74b531f65feaa09b5c3963f788b437a368933730 (diff) | |
download | git-6d1cdadbeeb03f40250526e29b1f1a91582911d8.tar.gz |
Merge branch 'ml/mailmap' into maint-1.7.6
* ml/mailmap:
mailmap: xcalloc mailmap_info
Conflicts:
mailmap.c
-rw-r--r-- | mailmap.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -70,8 +70,7 @@ static void add_mapping(struct string_list *map, } else { /* create mailmap entry */ struct string_list_item *item = string_list_insert_at_index(map, index, old_email); - item->util = xmalloc(sizeof(struct mailmap_entry)); - memset(item->util, 0, sizeof(struct mailmap_entry)); + item->util = xcalloc(1, sizeof(struct mailmap_entry)); ((struct mailmap_entry *)item->util)->namemap.strdup_strings = 1; } me = (struct mailmap_entry *)map->items[index].util; @@ -88,7 +87,7 @@ static void add_mapping(struct string_list *map, me->email = xstrdup(new_email); } } else { - struct mailmap_info *mi = xmalloc(sizeof(struct mailmap_info)); + struct mailmap_info *mi = xcalloc(1, sizeof(struct mailmap_info)); debug_mm("mailmap: adding (complex) entry for %s at index %d\n", old_email, index); if (new_name) mi->name = xstrdup(new_name); |