From 2b78358af5b883c7fefc2b22b2693c5e4af6e1d3 Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Sun, 26 Sep 2010 13:40:30 +0600 Subject: mpd_error: more correct MPD_ERROR implementation Original implementation does not handle if (...) MPD_ERROR("die"); else ... case well. This change fixes handling of such cases. --- src/mpd_error.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mpd_error.h') diff --git a/src/mpd_error.h b/src/mpd_error.h index 95e12057..47618d03 100644 --- a/src/mpd_error.h +++ b/src/mpd_error.h @@ -28,9 +28,9 @@ * proper error handling. */ #define MPD_ERROR(...) \ - { \ + do { \ g_critical(__VA_ARGS__); \ exit(EXIT_FAILURE); \ - } + } while(0) #endif -- cgit v1.2.3