Skip to content

Commit

Permalink
help: fix the size passed to qsort
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stefan Beller authored and Junio C Hamano committed Sep 18, 2014
1 parent 746c221 commit d333ac1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion help.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
uniq(&main_cmds);

/* This reuses cmdname->len for similarity index */
Expand Down

0 comments on commit d333ac1

Please sign in to comment.