]> git.ipfire.org Git - thirdparty/git.git/blobdiff - reflog-walk.c
use CALLOC_ARRAY
[thirdparty/git.git] / reflog-walk.c
index 3a25b27d8f8dbd49b4c33c81cb6af3c92f59759d..e9cd3283694decbc6ea8e72c5681766129df793d 100644 (file)
@@ -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;
 }
 
@@ -181,7 +181,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) {