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: Stefan Beller <stefanbeller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller committed
Sep 17, 2014 at 14:14 UTC
d333ac178547946271afc41885d3ea9914500a47
1 file changed
+1
-1
help.c
+1
-1
@@ -312,7 +312,7 @@ const char *help_unknown_cmd(const char *cmd)
312
add_cmd_list(&main_cmds, &aliases);
313
add_cmd_list(&main_cmds, &other_cmds);
314
qsort(main_cmds.names, main_cmds.cnt,
315
- sizeof(main_cmds.names), cmdname_compare);
315
+ sizeof(*main_cmds.names), cmdname_compare);
316
uniq(&main_cmds);
317
318
/* This reuses cmdname->len for similarity index */