]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed fb-atomic.test.
authorMartin Mares <mj@ucw.cz>
Thu, 30 Oct 2008 22:43:28 +0000 (23:43 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 30 Oct 2008 22:43:28 +0000 (23:43 +0100)
The test was failing whenever CONFIG_SHARED was set, because in such cases the
config file constructor was called twice and the config machinery died of
duplicate sections.

ucw/fb-atomic.c

index b117928971f848f616e82d22c4647081cef258b8..32c9ca9bfe3facd3da41bc29537bd2f321fd9916 100644 (file)
@@ -18,6 +18,8 @@
 
 static uns trace;
 
+#ifndef TEST
+
 static struct cf_section fbatomic_config = {
   CF_ITEMS {
     CF_UNS("Trace", &trace)
@@ -29,6 +31,8 @@ static void CONSTRUCTOR fbatomic_init_config(void)
   cf_declare_section("FBAtomic", &fbatomic_config, 1);
 }
 
+#endif
+
 #define TRACE(m...) do { if(trace) msg(L_DEBUG, "FB_ATOMIC: " m); } while(0)
 
 struct fb_atomic_file {