##// END OF EJS Templates
fix calloc(0, ...) issue
Jim Hague -
r5571:f84bb2e1 default
parent child Browse files
Show More
@@ -245,7 +245,7 b' static struct hunklist diff(struct line '
245
245
246 /* allocate and fill arrays */
246 /* allocate and fill arrays */
247 t = equatelines(a, an, b, bn);
247 t = equatelines(a, an, b, bn);
248 pos = (struct pos *)calloc(bn, sizeof(struct pos));
248 pos = (struct pos *)calloc(bn ? bn : 1, sizeof(struct pos));
249 /* we can't have more matches than lines in the shorter file */
249 /* we can't have more matches than lines in the shorter file */
250 l.head = l.base = (struct hunk *)malloc(sizeof(struct hunk) *
250 l.head = l.base = (struct hunk *)malloc(sizeof(struct hunk) *
251 ((an<bn ? an:bn) + 1));
251 ((an<bn ? an:bn) + 1));
General Comments 0
You need to be logged in to leave comments. Login now