Merge branch 'sb/help-unknown-command-sort-fix'
authorJunio C Hamano <gitster@pobox.com>
Fri, 26 Sep 2014 21:39:46 +0000 (14:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 26 Sep 2014 21:39:49 +0000 (14:39 -0700)
Code cleanup.

* sb/help-unknown-command-sort-fix:
help: fix the size passed to qsort

help.c
diff --git a/help.c b/help.c
index 7af65e205ecdf1a01dce009cbf0ada15de68c844..2072a873e2db784ca66c0f1736b12e523a96b7db 100644 (file)
--- a/help.c
+++ b/help.c
@@ -305,7 +305,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 abuses cmdname->len for levenshtein distance */