grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: [PATCH] fix qsort invocation in grub-install
Date: Sun, 10 Nov 2013 18:26:24 +0400	[thread overview]
Message-ID: <1384093584-19666-1-git-send-email-arvidjaar@gmail.com> (raw)
In-Reply-To: <527F8B1E.8040303@gmail.com>

Order of elements number and size is reversed.

---
 util/grub-install.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/grub-install.c b/util/grub-install.c
index 11010cc..87a0b3b 100644
--- a/util/grub-install.c
+++ b/util/grub-install.c
@@ -560,7 +560,7 @@ device_map_check_duplicates (const char *dev_map)
 
   fclose (fp);
 
-  qsort (d, sizeof (d[0]), filled, (int (*) (const void *, const void *))strcmp);
+  qsort (d, filled, sizeof (d[0]), (int (*) (const void *, const void *))strcmp);
 
   for (i = 0; i + 1 < filled; i++)
     if (strcmp (d[i], d[i+1]) == 0)
-- 
tg: (24685ac..) u/install_c-qsort (depends on: phcoder/install_c)


  reply	other threads:[~2013-11-10 14:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09 12:51 Install_c merge intention Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-10  4:58 ` Andrey Borzenkov
2013-11-10 13:33   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-10 14:26     ` Andrey Borzenkov [this message]
2013-11-10 14:39       ` [PATCH] fix qsort invocation in grub-install Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-10 14:52 ` Install_c merge intention Andrey Borzenkov
2013-11-10 15:38   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-11 17:15     ` Andrey Borzenkov
2013-11-16 19:52 ` Andrey Borzenkov
2013-11-16 19:57   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-11-16 20:12   ` Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-02 19:09 ` Jonathan McCune
2013-12-02 19:18   ` Andrey Borzenkov

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=1384093584-19666-1-git-send-email-arvidjaar@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /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).