summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Torri <storri@users.sourceforge.net>2003-02-28 22:34:24 +0000
committerStephen Torri <storri@users.sourceforge.net>2003-02-28 22:34:24 +0000
commitce3df9b1ecc08e5fa71c74217104d1100c849e60 (patch)
treebc5134eed097a247480d1548448b0b113a11f803
parent6d03a006b6377e2cb8a3ef9fc2e0b7b28dc3b107 (diff)
downloadxine-lib-ce3df9b1ecc08e5fa71c74217104d1100c849e60.tar.gz
xine-lib-ce3df9b1ecc08e5fa71c74217104d1100c849e60.tar.bz2
Put the functionality of XINE_ASSERT within an do {} while(0)
CVS patchset: 4310 CVS date: 2003/02/28 22:34:24
-rw-r--r--src/xine-utils/xineutils.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h
index 812cd087c..5d6e6e4d3 100644
--- a/src/xine-utils/xineutils.h
+++ b/src/xine-utils/xineutils.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xineutils.h,v 1.35 2003/02/28 21:57:17 jkeil Exp $
+ * $Id: xineutils.h,v 1.36 2003/02/28 22:34:24 storri Exp $
*
*/
#ifndef XINEUTILS_H
@@ -824,13 +824,15 @@ print_trace (void)
* Provide assert like feature with better description of failure
* Thanks to Mark Thomas
*/
-#define XINE_ASSERT(exp, desc, args...) \
- if (!(exp)) { \
- printf("%s:%s:%d: assertion `" #exp "' failed. " desc "\n\n", \
- __FILE__, __XINE_FUNCTION__, __LINE__, ##args); \
- print_trace(); \
- abort(); \
- }
+#define XINE_ASSERT(exp, desc, args...) \
+ do { \
+ if (!(exp)) { \
+ printf("%s:%s:%d: assertion `" #exp "' failed. " desc "\n\n", \
+ __FILE__, __XINE_FUNCTION__, __LINE__, ##args); \
+ print_trace(); \
+ abort(); \
+ } \
+ } while(0)
/******** double chained lists with builtin iterator *******/