[PATCH] Fix pointer arithmetic on a void*
Samuel Tan
samueltan at google.com
Thu Nov 5 12:05:56 PST 2015
>From fe6cca9c0d650f6c13bdccaa99351af9d1259168 Mon Sep 17 00:00:00 2001
From: Samuel Tan <samueltan at google.com>
Date: Thu, 5 Nov 2015 11:08:22 -0800
Subject: [PATCH] Fix pointer arithmetic on a void*
Fails to compile on x86 gcc due to pointer arithmetic on
a void*
Signed-off-by: Samuel Tan <samueltan at google.com>
---
wpa_supplicant/dbus/dbus_new_handlers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c
b/wpa_supplicant/dbus/dbus_new_handlers.c
index a963e85..0504f31 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -435,7 +435,7 @@ 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)) {
+ (char *)array + i
* element_size)) {
dbus_set_error(error, DBUS_ERROR_FAILED,
"%s: failed to construct message 2.5",
__func__);
--
2.6.0.rc2.230.g3dd15c0
More information about the Hostap
mailing list