diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-09 04:03:11 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-09 04:03:15 +0100 |
commit | 7bd34436ab676eee1ace2684eb785e536846e199 (patch) | |
tree | 20825c7d95117ad894f621e3450f94de4e23bb2d /src/libmdsserver | |
parent | do no print whence an error occurred if it is EMSGSIZE, ECONNRESET or EINTR, those are not real errors, just abnormalities (diff) | |
download | mds-7bd34436ab676eee1ace2684eb785e536846e199.tar.gz mds-7bd34436ab676eee1ace2684eb785e536846e199.tar.bz2 mds-7bd34436ab676eee1ace2684eb785e536846e199.tar.xz |
make fail_if friendlier to complex if-statements
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/libmdsserver')
-rw-r--r-- | src/libmdsserver/macros.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libmdsserver/macros.h b/src/libmdsserver/macros.h index f82c01d..5329298 100644 --- a/src/libmdsserver/macros.h +++ b/src/libmdsserver/macros.h @@ -384,14 +384,14 @@ * @param ... The condition */ #define fail_if(...) \ - if (__VA_ARGS__) \ - do \ + do \ + if (__VA_ARGS__) \ { \ if ((errno != EMSGSIZE) && (errno != ECONNRESET) && (errno != EINTR)) \ fprintf(stderr, "failure at %s:%i\n", __FILE__, __LINE__); \ - goto fail; \ + goto fail; \ } \ - while (0) + while (0) /** |