From: Stefan Beller <stefanbeller@gmail.com>
To: pdebie@ai.rug.nl, gitster@pobox.com, git@vger.kernel.org
Cc: Stefan Beller <stefanbeller@gmail.com>
Subject: [PATCH] help: Fix size passed to qsort
Date: Wed, 17 Sep 2014 14:14:39 +0200 [thread overview]
Message-ID: <1410956079-23513-1-git-send-email-stefanbeller@gmail.com> (raw)
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
next reply other threads:[~2014-09-17 12:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-17 12:14 Stefan Beller [this message]
2014-09-18 17:17 ` [PATCH] help: Fix size passed to qsort Junio C Hamano
2014-09-18 17:34 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1410956079-23513-1-git-send-email-stefanbeller@gmail.com \
--to=stefanbeller@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pdebie@ai.rug.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).