]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
P->magic used just in LOCAL_DEBUG mode
authorOndrej Filip <feela@network.cz>
Wed, 23 Jun 2004 21:34:26 +0000 (21:34 +0000)
committerOndrej Filip <feela@network.cz>
Wed, 23 Jun 2004 21:34:26 +0000 (21:34 +0000)
proto/rip/rip.c
proto/rip/rip.h

index 342b98abfa425745ba25569c1e7b9e32fb3ef296..71758cc3a3c86ae41023c5d1cd57b470e0ec56d8 100644 (file)
@@ -572,8 +572,9 @@ rip_start(struct proto *p)
   assert( sizeof(struct rip_block) == 20);
   assert( sizeof(struct rip_block_auth) == 20);
 
-
+#ifdef LOCAL_DEBUG
   P->magic = RIP_MAGIC;
+#endif
   fib_init( &P->rtable, p->pool, sizeof( struct rip_entry ), 0, NULL );
   init_list( &P->connections );
   init_list( &P->garbage );
index 30002ea3607da606bb2f3f3c43b8b3f8bb15fb4f..e01a4bdb90e467b71a7cb9a01e0ed25f776595ba 100644 (file)
@@ -146,13 +146,19 @@ struct rip_proto {
   struct fib rtable;
   list garbage;
   list interfaces;     /* Interfaces we really know about */
+#ifdef LOCAL_DEBUG
   int magic;
+#endif
   int tx_count;                /* Do one regular update once in a while */
 };
 
-
+#ifdef LOCAL_DEBUG
 #define RIP_MAGIC 81861253
 #define CHK_MAGIC do { if (P->magic != RIP_MAGIC) bug( "Not enough magic" ); } while (0)
+#else
+#define CHK_MAGIC do { } while (0)
+#endif
+
 
 void rip_init_instance(struct proto *p);
 void rip_init_config(struct rip_proto_config *c);