From 971a511c3d1f5d9f95af282188a9e0a82041ae6b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 22 Jun 2011 14:44:28 +0100 Subject: [PATCH 1/3] Split DBUS_GENERIC_STRING_PREAMBLE into sensible lines --- dbus/dbus-string-private.h | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) 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 -- 1.7.5.4