]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Allow NULL to init_fib().
authorPavel Machek <pavel@ucw.cz>
Tue, 22 Dec 1998 18:55:49 +0000 (18:55 +0000)
committerPavel Machek <pavel@ucw.cz>
Tue, 22 Dec 1998 18:55:49 +0000 (18:55 +0000)
nest/rt-fib.c

index f436525afb22737cf6f3007ad582d0314d400451..fd5c51b673842683c8c80dba27c7dafc383a49ff 100644 (file)
@@ -51,6 +51,11 @@ fib_hash(struct fib *f, ip_addr *a)
   return ipa_hash(*a) >> f->hash_shift;
 }
 
+static void *
+fib_dummy_init(struct fib_node *)
+{
+}
+
 void
 fib_init(struct fib *f, pool *p, unsigned node_size, unsigned hash_order, void (*init)(struct fib_node *))
 {
@@ -63,7 +68,7 @@ fib_init(struct fib *f, pool *p, unsigned node_size, unsigned hash_order, void (
   bzero(f->hash_table, f->hash_size * sizeof(struct fib_node *));
   f->entries = 0;
   f->entries_min = 0;
-  f->init = init;
+  f->init = init ? : fib_dummy_init;
 }
 
 static void