diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2000-06-15 20:56:25 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2000-06-15 20:56:25 +0000 |
commit | eb383413c242546f266f9694071e0480806649b3 (patch) | |
tree | 95b240bd0c181ac81463ba1f0e6b97f06e973638 /libiberty/partition.c | |
parent | b91280077a7ea882b26a1dfb84b1f314e84c6a86 (diff) | |
download | gdb-eb383413c242546f266f9694071e0480806649b3.zip gdb-eb383413c242546f266f9694071e0480806649b3.tar.gz gdb-eb383413c242546f266f9694071e0480806649b3.tar.bz2 |
Synced with libiberty in the gcc repository.
Diffstat (limited to 'libiberty/partition.c')
-rw-r--r-- | libiberty/partition.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libiberty/partition.c b/libiberty/partition.c index 52fb128..a5a7349 100644 --- a/libiberty/partition.c +++ b/libiberty/partition.c @@ -34,6 +34,8 @@ #include "libiberty.h" #include "partition.h" +static int elem_compare PARAMS ((const void *, const void *)); + /* Creates a partition of NUM_ELEMENTS elements. Initially each element is in a class by itself. */ @@ -128,8 +130,8 @@ elem_compare (elem1, elem2) const void *elem1; const void *elem2; { - int e1 = * (int *) elem1; - int e2 = * (int *) elem2; + int e1 = * (const int *) elem1; + int e2 = * (const int *) elem2; if (e1 < e2) return -1; else if (e1 > e2) @@ -175,7 +177,7 @@ partition_print (part, fp) c = elements[c].next - elements; } /* Sort them. */ - qsort ((void *) class_elements, count, sizeof (int), &elem_compare); + qsort ((void *) class_elements, count, sizeof (int), elem_compare); /* Print them. */ fputc ('(', fp); for (i = 0; i < count; ++i) |