sl: osad -Wcalloc-transposed args
warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]. Swap the args.
This commit is contained in:
@@ -434,9 +434,9 @@ osad(const char *s1, const char *s2)
|
|||||||
size_t l1 = strlen(s1), l2 = strlen(s2), i, j;
|
size_t l1 = strlen(s1), l2 = strlen(s2), i, j;
|
||||||
int *row0, *row1, *row2, *tmp, cost;
|
int *row0, *row1, *row2, *tmp, cost;
|
||||||
|
|
||||||
row0 = calloc(sizeof(int), l2 + 1);
|
row0 = calloc(l2 + 1, sizeof(int));
|
||||||
row1 = calloc(sizeof(int), l2 + 1);
|
row1 = calloc(l2 + 1, sizeof(int));
|
||||||
row2 = calloc(sizeof(int), l2 + 1);
|
row2 = calloc(l2 + 1, sizeof(int));
|
||||||
|
|
||||||
for (j = 0; j < l2 + 1; j++)
|
for (j = 0; j < l2 + 1; j++)
|
||||||
row1[j] = j;
|
row1[j] = j;
|
||||||
|
Reference in New Issue
Block a user