summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/dbus-util.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>2010-10-20 14:04:38 +0300
committerLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>2010-10-20 14:30:05 +0300
commitf564c7d76371380980faa10ee3c756c3130c60bf (patch)
tree23bb10b205730f8305a69f6216cb5e1d9a21660a /src/pulsecore/dbus-util.c
parente8a7d1932fb0b2acb080fdd7972caa7f8cb43c3d (diff)
core: make use of dbus_message_iter_append_fixed_array
dbus_message_iter_append_fixed_array does appends a block of fixed-length values to an array.
Diffstat (limited to 'src/pulsecore/dbus-util.c')
-rw-r--r--src/pulsecore/dbus-util.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/pulsecore/dbus-util.c b/src/pulsecore/dbus-util.c
index 09ab071b..8b203051 100644
--- a/src/pulsecore/dbus-util.c
+++ b/src/pulsecore/dbus-util.c
@@ -595,19 +595,14 @@ void pa_dbus_send_proplist_variant_reply(DBusConnection *c, DBusMessage *in_repl
void pa_dbus_append_basic_array(DBusMessageIter *iter, int item_type, const void *array, unsigned n) {
DBusMessageIter array_iter;
- unsigned i;
- unsigned item_size;
pa_assert(iter);
pa_assert(dbus_type_is_basic(item_type));
pa_assert(array || n == 0);
- item_size = basic_type_size(item_type);
-
pa_assert_se(dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY, signature_from_basic_type(item_type), &array_iter));
- for (i = 0; i < n; ++i)
- pa_assert_se(dbus_message_iter_append_basic(&array_iter, item_type, &((uint8_t*) array)[i * item_size]));
+ pa_assert_se(dbus_message_iter_append_fixed_array(&array_iter, item_type, array, n));
pa_assert_se(dbus_message_iter_close_container(iter, &array_iter));
};