All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kexec: (bugfix) mem_regions_sort()
@ 2016-07-29  8:23 AKASHI Takahiro
  2016-07-29  8:25 ` Pratyush Anand
  0 siblings, 1 reply; 3+ messages in thread
From: AKASHI Takahiro @ 2016-07-29  8:23 UTC (permalink / raw)
  To: horms; +Cc: AKASHI Takahiro, rmk, kexec

The third argument of qsort() must be the size of each array element.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 kexec/mem_regions.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kexec/mem_regions.c b/kexec/mem_regions.c
index e61c074..a8cb510 100644
--- a/kexec/mem_regions.c
+++ b/kexec/mem_regions.c
@@ -24,7 +24,7 @@ static int mem_range_cmp(const void *a1, const void *a2)
  */
 void mem_regions_sort(struct memory_ranges *ranges)
 {
-	qsort(ranges->ranges, ranges->size, sizeof(ranges->ranges),
+	qsort(ranges->ranges, ranges->size, sizeof(ranges->ranges[0]),
 	      mem_range_cmp);
 }
 
-- 
2.9.0


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

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

end of thread, other threads:[~2016-08-01  4:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-29  8:23 [PATCH] kexec: (bugfix) mem_regions_sort() AKASHI Takahiro
2016-07-29  8:25 ` Pratyush Anand
2016-08-01  4:32   ` AKASHI Takahiro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.