diff options
author | Denis Krjuchkov <alcohold@gmail.com> | 2010-09-26 13:40:30 +0600 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-09-28 18:12:14 +0200 |
commit | 2b78358af5b883c7fefc2b22b2693c5e4af6e1d3 (patch) | |
tree | efe252d494810c02e046855d8858fdc6e0120c38 /src/mpd_error.h | |
parent | a59ab3e2ee4407a1c912cdf0d2e09f8670cc3ffe (diff) | |
download | mpd-2b78358af5b883c7fefc2b22b2693c5e4af6e1d3.tar.gz mpd-2b78358af5b883c7fefc2b22b2693c5e4af6e1d3.tar.xz mpd-2b78358af5b883c7fefc2b22b2693c5e4af6e1d3.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/mpd_error.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mpd_error.h b/src/mpd_error.h index 95e120572..47618d03c 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 |