The calloc() and xcalloc() functions takes @nmemb first and then @size. Fix all w/ pattern "calloc\s*(\s*sizeof".
Showing the changes to scripts (1 of 3 files). Show all
Unified · Split
| @@ -330,10 +330,10 @@ static void set_subtitle(void) · 329 unmodified lines | |||
| 330 | list_for_each_entry(sp, &trail, entries) { | 330 | list_for_each_entry(sp, &trail, entries) { |
| 331 | if (sp->text) { | 331 | if (sp->text) { |
| 332 | if (pos) { | 332 | if (pos) { |
| 333 | pos->next = xcalloc(sizeof(*pos), 1); | 333 | pos->next = xcalloc(1, sizeof(*pos)); |
| 334 | pos = pos->next; | 334 | pos = pos->next; |
| 335 | } else { | 335 | } else { |
| 336 | subtitles = pos = xcalloc(sizeof(*pos), 1); | 336 | subtitles = pos = xcalloc(1, sizeof(*pos)); |
| 337 | } | 337 | } |
| 338 | pos->text = sp->text; | 338 | pos->text = sp->text; |
| 339 | } | 339 | } |