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 | 330 | list_for_each_entry(sp, &trail, entries) { |
| 331 | 331 | if (sp->text) { |
| 332 | 332 | if (pos) { |
| 333 | − pos->next = xcalloc(sizeof(*pos), 1); | |
| 333 | + pos->next = xcalloc(1, sizeof(*pos)); | |
| 334 | 334 | pos = pos->next; |
| 335 | 335 | } else { |
| 336 | − subtitles = pos = xcalloc(sizeof(*pos), 1); | |
| 336 | + subtitles = pos = xcalloc(1, sizeof(*pos)); | |
| 337 | 337 | } |
| 338 | 338 | pos->text = sp->text; |
| 339 | 339 | } |