[PATCH] help: Fix size passed to qsort
From: Stefan Beller <hidden>
Date: 2016-06-15 23:02:33
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Stefan Beller <hidden>
Date: 2016-06-15 23:02:33
Subsystem:
the rest · Maintainer:
Linus Torvalds
We actually want to have the size of one 'name' and not the size of the names array. Signed-off-by: Stefan Beller <redacted> --- help.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/help.c b/help.c
index 7af65e2..2072a87 100644
--- 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 */
--
2.1.0.238.gce1d3a9