Ramkumar Ramachandra <artagnon@xxxxxxxxx> writes: > + string_list_insert(&subcmds, "list")->util = &util[0]; > + string_list_insert(&subcmds, "add")->util = &util[1]; > ... If you make "struct subcommand" to contain entry's own name, you could simply do this, no? for (i = 0; i < ARRAY_SIZE(util); i++) string_list_insert(&subcmds, util[i].name)->util = &util[i]; Perhaps append all and then sort once at the end? -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html