Module: sip-router
Branch: master
Commit: 37b96e540e1c9d96db1659504ffe5cbd5d3fc5c1
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=37b96e5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Apr 22 18:26:11 2009 +0200
libkcore: use atomic_add instead of atomic_sub
- swap parameters of atomic_add to match SR prototype
---
lib/kcore/statistics.h | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/lib/kcore/statistics.h b/lib/kcore/statistics.h
index b81a48a..68a835e 100644
--- a/lib/kcore/statistics.h
+++ b/lib/kcore/statistics.h
@@ -133,10 +133,7 @@ module_stats* get_stat_module(str *module);
#define update_stat( _var, _n) \
do { \
if ( !((_var)->flags&STAT_IS_FUNC) ) {\
- if (_n>=0) \
- atomic_add( _n, (_var)->u.val);\
- else \
- atomic_sub( -(_n), (_var)->u.val);\
+ atomic_add((_var)->u.val, _n);\
}\
}while(0)
#define reset_stat( _var) \