Commit d333ac17 authored by Stefan Beller's avatar Stefan Beller Committed by Junio C Hamano

help: fix the size passed to qsort

We actually want to have the size of one 'name' and not the size
of the pointer.
Signed-off-by: default avatarStefan Beller <>
Signed-off-by: default avatarJunio C Hamano <>
parent 746c221a
......@@ -312,7 +312,7 @@ const char *help_unknown_cmd(const char *cmd)
add_cmd_list(&main_cmds, &aliases);
add_cmd_list(&main_cmds, &other_cmds);
qsort(main_cmds.names, main_cmds.cnt,
sizeof(main_cmds.names), cmdname_compare);
sizeof(*main_cmds.names), cmdname_compare);
/* This reuses cmdname->len for similarity index */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment