]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/binheap-test.c
xtypes: Added FIXME with possible segfault.
[libucw.git] / ucw / binheap-test.c
index 76b1a9bc994e6eef733137dbb1f72d2e2b6fa027..8d95367bc5ef263b5a1c8019ad60968e40900449 100644 (file)
 
 struct item {
   struct bh_node n;
-  uns key;
+  uint key;
 };
 
-static inline uns bht_key(struct bh_node *n)
+static inline uint bht_key(struct bh_node *n)
 {
   return ((struct item *)n)->key;
 }
 
-static inline uns bht_less(struct bh_node *a, struct bh_node *b)
+static inline uint bht_less(struct bh_node *a, struct bh_node *b)
 {
   return bht_key(a) < bht_key(b);
 }
 
 static void
-bht_do_dump(struct bh_node *a, struct bh_node *expected_last, uns offset)
+bht_do_dump(struct bh_node *a, struct bh_node *expected_last, uint offset)
 {
   if (!a)
     return;
@@ -56,7 +56,7 @@ bht_dump(struct bh_heap *h)
 
 int main(void)
 {
-  uns i;
+  uint i;
   struct bh_heap h;
 #define N 1048576
 #define K(i) ((259309*i+1009)%N)
@@ -73,7 +73,7 @@ int main(void)
     }
   // bht_dump(&h);
   ASSERT(bht_key(bht_findmin(&h)) == 0);
-  uns cnt = 0;
+  uint cnt = 0;
   BH_FOR_ALL(bht_, &h, a)
     {
       cnt++;