Missed CCing Russell because of --suppress-cc :(

CCing now.

On Wed, Jul 27, 2016 at 11:19 PM, Pratyush Anand <[email protected]> wrote:
> ranges->ranges is  "struct memory_range *", however each element which need
> to be sorted is of type "struct memory_range". So, correct "size" argument
> of qsort() as sizeof(*ranges->ranges).
>
> Signed-off-by: Pratyush Anand <[email protected]>
> Cc:Russell King <[email protected]>
> Cc:Simon Horman <[email protected]>
> ---
>  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 e61c07472f1b..50c8abccb93a 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),
>               mem_range_cmp);
>  }
>
> --
> 2.5.5
>

_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to