summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-12-08 04:11:54 +0000
committerMike Blumenkrantz <michael.blumenkrantz@gmail.com>2011-12-08 04:11:54 +0000
commitccf958883c42d5c397ea0c0b3d82e15c6954f457 (patch)
tree11aa2f1a609bae528da126cd4c6a16e223e60fc8
parentd617a4ffd35845bc1e4ccdfc9b263cd1cdfc2b8c (diff)
fix eina_log*level_check() to return the value that the docs claim will be returned
how did nobody catch this sooner? SVN revision: 66013
-rw-r--r--ChangeLog4
-rw-r--r--src/include/eina_inline_log.x4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f8c2919..41dc883 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -27,3 +27,7 @@
272011-08-09 Mike McCormack 272011-08-09 Mike McCormack
28 28
29 * Fix eina_hamster_count on some machines 29 * Fix eina_hamster_count on some machines
30
312011-12-07 Mike Blumenkrantz (discomfitor/zmike)
32
33 * eina_log*level_check() functions now return the correct value
diff --git a/src/include/eina_inline_log.x b/src/include/eina_inline_log.x
index 4cdd7d8..53d8afb 100644
--- a/src/include/eina_inline_log.x
+++ b/src/include/eina_inline_log.x
@@ -49,7 +49,7 @@
49static inline Eina_Bool 49static inline Eina_Bool
50eina_log_level_check(int level) 50eina_log_level_check(int level)
51{ 51{
52 return eina_log_level_get() <= level; 52 return eina_log_level_get() >= level;
53} 53}
54 54
55/** 55/**
@@ -81,7 +81,7 @@ eina_log_domain_level_check(int domain, int level)
81 int dom_level = eina_log_domain_registered_level_get(domain); 81 int dom_level = eina_log_domain_registered_level_get(domain);
82 if (EINA_UNLIKELY(dom_level == EINA_LOG_LEVEL_UNKNOWN)) 82 if (EINA_UNLIKELY(dom_level == EINA_LOG_LEVEL_UNKNOWN))
83 return EINA_FALSE; 83 return EINA_FALSE;
84 return dom_level <= level; 84 return dom_level >= level;
85} 85}
86 86
87/** 87/**