[rrd-developers] [PATCH] rrdcached: Do not put any code in assert().
    Sebastian Harl 
    sh at tokkee.org
       
    Mon Mar 22 14:51:29 CET 2010
    
    
  
… else, that code is removed when compiling with NDEBUG defined.
---
 program/src/rrd_daemon.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/program/src/rrd_daemon.c b/program/src/rrd_daemon.c
index 372adee..d42fb0e 100644
--- a/program/src/rrd_daemon.c
+++ b/program/src/rrd_daemon.c
@@ -820,9 +820,10 @@ static int flush_old_values (int max_age)
 
   for (k = 0; k < cfd.keys_num; k++)
   {
+    gboolean status = g_tree_remove(cache_tree, cfd.keys[k]);
     /* should never fail, since we have held the cache_lock
      * the entire time */
-    assert( g_tree_remove(cache_tree, cfd.keys[k]) == TRUE );
+    assert(status == TRUE);
   }
 
   if (cfd.keys != NULL)
-- 
1.6.5.rc2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.oetiker.ch/pipermail/rrd-developers/attachments/20100322/74bd2e47/attachment.pgp 
    
    
More information about the rrd-developers
mailing list