From: Simon McVittie Date: Wed, 22 Jun 2011 13:44:28 +0000 (+0100) Subject: Split DBUS_GENERIC_STRING_PREAMBLE into sensible lines X-Git-Tag: dbus-1.5.6~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c8a7417c738c9a2cf52b8e870808cb148b326c08;p=platform%2Fupstream%2Fdbus.git Split DBUS_GENERIC_STRING_PREAMBLE into sensible lines Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38570 Reviewed-by: Will Thompson --- diff --git a/dbus/dbus-string-private.h b/dbus/dbus-string-private.h index 365d89a..500e0b7 100644 --- a/dbus/dbus-string-private.h +++ b/dbus/dbus-string-private.h @@ -73,7 +73,16 @@ typedef struct * * @param real the DBusRealString */ -#define DBUS_GENERIC_STRING_PREAMBLE(real) _dbus_assert ((real) != NULL); _dbus_assert (!(real)->invalid); _dbus_assert ((real)->len >= 0); _dbus_assert ((real)->allocated >= 0); _dbus_assert ((real)->max_length >= 0); _dbus_assert ((real)->len <= ((real)->allocated - _DBUS_STRING_ALLOCATION_PADDING)); _dbus_assert ((real)->len <= (real)->max_length) +#define DBUS_GENERIC_STRING_PREAMBLE(real) \ + do { \ + _dbus_assert ((real) != NULL); \ + _dbus_assert (!(real)->invalid); \ + _dbus_assert ((real)->len >= 0); \ + _dbus_assert ((real)->allocated >= 0); \ + _dbus_assert ((real)->max_length >= 0); \ + _dbus_assert ((real)->len <= ((real)->allocated - _DBUS_STRING_ALLOCATION_PADDING)); \ + _dbus_assert ((real)->len <= (real)->max_length); \ + } while (0) /** * Checks assertions about a string object that needs to be