git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] help: Fix size passed to qsort
@ 2014-09-17 12:14 Stefan Beller
  2014-09-18 17:17 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Beller @ 2014-09-17 12:14 UTC (permalink / raw)
  To: pdebie, gitster, git; +Cc: Stefan Beller

We actually want to have the size of one 'name' and not the size
of the names array.

Signed-off-by: Stefan Beller <stefanbeller@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-18 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-17 12:14 [PATCH] help: Fix size passed to qsort Stefan Beller
2014-09-18 17:17 ` Junio C Hamano
2014-09-18 17:34   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).