summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/ChangeLog5
-rw-r--r--runtime/map.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog
index ee355cf5..18999439 100644
--- a/runtime/ChangeLog
+++ b/runtime/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-13 Martin Hunt <hunt@redhat.com>
+
+ * map.c (_stp_map_sortn): Set a limit of 30 for n. Automatically
+ call _stp_map_sort() if more is requested.
+
2005-12-08 Martin Hunt <hunt@redhat.com>
* map.c (_new_map_create): Only increment map size if a node
diff --git a/runtime/map.c b/runtime/map.c
index 19c02580..1fa4a0e5 100644
--- a/runtime/map.c
+++ b/runtime/map.c
@@ -564,7 +564,7 @@ void _stp_map_sort (MAP map, int keynum, int dir)
*/
void _stp_map_sortn(MAP map, int n, int keynum, int dir)
{
- if (n == 0) {
+ if (n == 0 || n > 30) {
_stp_map_sort(map, keynum, dir);
} else {
struct list_head *head = &map->head;