Merge branch 'so/rebase-doc-fork-point'
[gitweb.git] / line-log.c
index 1008e722584c882ac86b936307ace701b9225aaf..038c58a395c6804e5f719d4d82a3d4edbd6d8901 100644 (file)
@@ -533,7 +533,7 @@ static void fill_line_ends(struct diff_filespec *spec, long *lines,
        }
 
        /* shrink the array to fit the elements */
-       ends = xrealloc(ends, cur * sizeof(*ends));
+       REALLOC_ARRAY(ends, cur);
        *lines = cur-1;
        *line_ends = ends;
 }