summaryrefslogtreecommitdiff
path: root/sql/sql_callback.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-04-25 17:22:25 +0200
committerSergei Golubchik <sergii@pisem.net>2011-04-25 17:22:25 +0200
commit0accbd0364e0333e0b119aa9ce93e34ded9df6cb (patch)
treebdf0738c29dc1f57fbfba3a1754524e238f15b52 /sql/sql_callback.h
parent37f87d73ae8dc6c30594867b40a5d70159acf63c (diff)
downloadmariadb-git-0accbd0364e0333e0b119aa9ce93e34ded9df6cb.tar.gz
lots of post-merge changes
Diffstat (limited to 'sql/sql_callback.h')
-rw-r--r--sql/sql_callback.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_callback.h b/sql/sql_callback.h
index 834d8b74c7a..ea51c107ff9 100644
--- a/sql/sql_callback.h
+++ b/sql/sql_callback.h
@@ -31,10 +31,12 @@
*/
#define MYSQL_CALLBACK(OBJ, FUNC, PARAMS) \
- (((OBJ) && ((OBJ)->FUNC)) ? (OBJ)->FUNC PARAMS : 0)
+ do { \
+ if ((OBJ) && ((OBJ)->FUNC)) \
+ (OBJ)->FUNC PARAMS; \
+ } while (0)
-#define MYSQL_CALLBACK_ELSE0(OBJ, FUNC, PARAMS, ELSE) \
+#define MYSQL_CALLBACK_ELSE(OBJ, FUNC, PARAMS, ELSE) \
(((OBJ) && ((OBJ)->FUNC)) ? (OBJ)->FUNC PARAMS : (ELSE))
-
#endif /* SQL_CALLBACK_INCLUDED */