help: fix the size passed to qsort
[gitweb.git] / help.c
diff --git a/help.c b/help.c
index fd87bb5aeec82beec600be46248b19b13bb33804..3678d6a98b6ca119d24be58783450c167673de9b 100644 (file)
--- 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 */