History

calloc/xcalloc: Fix argument order

The calloc() and xcalloc() functions takes @nmemb first and then @size. Fix all w/ pattern "calloc\s*(\s*sizeof".

Arjun Sreedharan committed 11 years ago

Commit e4e458b1 parent 2e777843 files · +7 −7Browse files

Showing the changes to scripts (1 of 3 files). Show all

Unified · Split

scripts/kconfig/mconf.c+2−2
@@ -330,10 +330,10 @@ static void set_subtitle(void) · 329 unmodified lines
330330 list_for_each_entry(sp, &trail, entries) {
331331 if (sp->text) {
332332 if (pos) {
333− pos->next = xcalloc(sizeof(*pos), 1);
333+ pos->next = xcalloc(1, sizeof(*pos));
334334 pos = pos->next;
335335 } else {
336− subtitles = pos = xcalloc(sizeof(*pos), 1);
336+ subtitles = pos = xcalloc(1, sizeof(*pos));
337337 }
338338 pos->text = sp->text;
339339 }