changeset 35677 | cf2e2a7399bc |
parent 34632 | 7201e3607d90 |
child 35723 | 50868145a8de |
35676:9c575c22dcf4 | 35677:cf2e2a7399bc |
---|---|
39 if (*p == '\n') |
39 if (*p == '\n') |
40 i++; |
40 i++; |
41 if (p == plast) |
41 if (p == plast) |
42 i++; |
42 i++; |
43 |
43 |
44 *lr = l = (struct bdiff_line *)malloc(sizeof(struct bdiff_line) * i); |
44 *lr = l = (struct bdiff_line *)calloc(i, sizeof(struct bdiff_line)); |
45 if (!l) |
45 if (!l) |
46 return -1; |
46 return -1; |
47 |
47 |
48 /* build the line array and calculate hashes */ |
48 /* build the line array and calculate hashes */ |
49 hash = 0; |
49 hash = 0; |