diff options
Diffstat (limited to 'reflog-walk.c')
-rw-r--r-- | reflog-walk.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/reflog-walk.c b/reflog-walk.c index 3a25b27d8f..8ac4b284b6 100644 --- a/reflog-walk.c +++ b/reflog-walk.c @@ -112,7 +112,7 @@ struct reflog_walk_info { void init_reflog_walk(struct reflog_walk_info **info) { - *info = xcalloc(1, sizeof(struct reflog_walk_info)); + CALLOC_ARRAY(*info, 1); (*info)->complete_reflogs.strdup_strings = 1; } @@ -158,10 +158,9 @@ int add_reflog_for_walk(struct reflog_walk_info *info, } reflogs = read_complete_reflog(branch); if (!reflogs || reflogs->nr == 0) { - struct object_id oid; char *b; int ret = dwim_log(branch, strlen(branch), - &oid, &b); + NULL, &b); if (ret > 1) free(b); else if (ret == 1) { @@ -181,7 +180,7 @@ int add_reflog_for_walk(struct reflog_walk_info *info, } free(branch); - commit_reflog = xcalloc(1, sizeof(struct commit_reflog)); + CALLOC_ARRAY(commit_reflog, 1); if (recno < 0) { commit_reflog->recno = get_reflog_recno_by_time(reflogs, timestamp); if (commit_reflog->recno < 0) { |