lkml.org 
[lkml]   [2010]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 02/13] jump label v9: base patch
    From
    Date
    On Wed, 2010-06-09 at 17:38 -0400, Jason Baron wrote:
    > +static void sort_jump_label_entries(struct jump_entry *start, struct jump_entry *stop)
    > +{
    > + int swapped = 0;
    > + struct jump_entry *iter;
    > + struct jump_entry *iter_next;
    > +
    > + do {
    > + swapped = 0;
    > + iter = start;
    > + iter_next = start;
    > + iter_next++;
    > + for (; iter_next < stop; iter++, iter_next++) {
    > + if (strcmp((char *)iter->name,
    > + (char *)iter_next->name) > 0) {
    > + swap_jump_label_entries(iter, iter_next);
    > + swapped = 1;
    > + }
    > + }
    > + } while (swapped == 1);
    > +}

    Would lib/sort.c be of any help?


    \
     
     \ /
      Last update: 2010-06-10 14:09    [W:7.898 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site