[PATCH] rrdcached: Do not put any code in assert().
Sebastian Harl <[email protected]>
| Newsgroups | gmane.comp.db.rrdtool.devel |
|---|---|
| Message-ID | <[email protected]> |
… 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
_______________________________________________
rrd-developers mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkundeEACgkQEFEKc4UBx/xRrgCdHNfoYrLKkZmb0Km5Inz5ER3O a1IAn0U4iJLUdImozJC1V1DdkJqrn6sA =QMYH -----END PGP SIGNATURE-----