]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
dbus: Do not use pointer arithmetic with a void pointer
authorSamuel Tan <samueltan@google.com>
Thu, 5 Nov 2015 19:08:22 +0000 (11:08 -0800)
committerJouni Malinen <j@w1.fi>
Sun, 15 Nov 2015 17:34:51 +0000 (19:34 +0200)
This failed to compile on x86 gcc due to pointer arithmetic on a void
pointer.

Signed-off-by: Samuel Tan <samueltan@google.com>
wpa_supplicant/dbus/dbus_new_handlers.c

index a357dcb262cd743308fcb14bd56708b449b19020..fbfcdc9a9cee706b37faf119202a955bc1fc5de4 100644 (file)
@@ -435,7 +435,8 @@ dbus_bool_t wpas_dbus_simple_array_property_getter(DBusMessageIter *iter,
 
        for (i = 0; i < array_len; i++) {
                if (!dbus_message_iter_append_basic(&array_iter, type,
-                                                   array + i * element_size)) {
+                                                   (const char *) array +
+                                                   i * element_size)) {
                        dbus_set_error(error, DBUS_ERROR_FAILED,
                                       "%s: failed to construct message 2.5",
                                       __func__);