From d333ac178547946271afc41885d3ea9914500a47 Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Wed, 17 Sep 2014 14:14:39 +0200 Subject: [PATCH] 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 Signed-off-by: Junio C Hamano --- help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/help.c b/help.c index fd87bb5aee..3678d6a98b 100644 --- a/help.c +++ b/help.c @@ -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 */ -- 2.11.4.GIT