mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-08 17:30:21 +01:00
_DBUS_STRING_DEFINE_STATIC: Don't include zero termination in length
_dbus_string_init_const() doesn't include the trailing '\0' in the DBusRealString->len, so this surely shouldn't either. In practice none of the users of _DBUS_STRING_DEFINE_STATIC care one way or the other, but it seems better to be consistent. Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=89104
This commit is contained in:
parent
3e2463fa1f
commit
4330c213e7
1 changed files with 1 additions and 1 deletions
|
|
@ -402,7 +402,7 @@ _dbus_string_get_const_udata_len (const DBusString *str, int start, int len)
|
|||
#define _DBUS_STRING_DEFINE_STATIC(name, str) \
|
||||
static const char _dbus_static_string_##name[] = str; \
|
||||
static const DBusString name = { _dbus_static_string_##name, \
|
||||
sizeof(_dbus_static_string_##name), \
|
||||
sizeof(_dbus_static_string_##name) - 1, \
|
||||
sizeof(_dbus_static_string_##name) + \
|
||||
_DBUS_STRING_ALLOCATION_PADDING, \
|
||||
TRUE, TRUE, FALSE, 0 }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue