[libbluray-devel] Fix macro
hpi1
git at videolan.org
Sun Aug 7 13:33:27 CEST 2016
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Sun Aug 7 13:46:36 2016 +0300| [fbf938c55da92b3b5106b4c2aa1f53eeb169bbd4] | committer: hpi1
Fix macro
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=fbf938c55da92b3b5106b4c2aa1f53eeb169bbd4
---
src/libbluray/bdj/native/bdjo.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/libbluray/bdj/native/bdjo.c b/src/libbluray/bdj/native/bdjo.c
index fdb7a09..e9f71a5 100644
--- a/src/libbluray/bdj/native/bdjo.c
+++ b/src/libbluray/bdj/native/bdjo.c
@@ -35,10 +35,16 @@
* https://hdcookbook.dev.java.net/
*/
-#define JNICHK(a) if((*env)->ExceptionOccurred(env)) { \
- BD_DEBUG(DBG_BDJ, "Exception occured\n"); \
- (*env)->ExceptionDescribe(env); \
- } if (!a) return NULL;
+#define JNICHK(a) \
+ do { \
+ if ((*env)->ExceptionOccurred(env)) { \
+ BD_DEBUG(DBG_BDJ | DBG_CRIT, "Exception occured\n"); \
+ (*env)->ExceptionDescribe(env); \
+ } \
+ if (!(a)) { \
+ return NULL; \
+ } \
+ } while (0)
/*
*
More information about the libbluray-devel
mailing list