Skip to content

Commit d333ac1

Browse files
stefanbellergitster
authored andcommitted
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>
1 parent 746c221 commit d333ac1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

help.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ const char *help_unknown_cmd(const char *cmd)
312312
add_cmd_list(&main_cmds, &aliases);
313313
add_cmd_list(&main_cmds, &other_cmds);
314314
qsort(main_cmds.names, main_cmds.cnt,
315-
sizeof(main_cmds.names), cmdname_compare);
315+
sizeof(*main_cmds.names), cmdname_compare);
316316
uniq(&main_cmds);
317317

318318
/* This reuses cmdname->len for similarity index */

0 commit comments

Comments
 (0)