]> code.delx.au - pulseaudio/commitdiff
bluetooth: Fix variable constness
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Sun, 29 Sep 2013 15:49:23 +0000 (18:49 +0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Tue, 29 Oct 2013 18:46:47 +0000 (20:46 +0200)
The string points to memory inside a DBusMessage, so we don't own the string.

src/modules/bluetooth/bluez5-util.c

index 2be15d8de77ffbb83ae380755307dde357b1c962..eaff4b1eb5ce1cc97696b5c19804c746222f2f8d 100644 (file)
@@ -651,7 +651,7 @@ static void parse_adapter_properties(pa_bluetooth_adapter *a, DBusMessageIter *i
         dbus_message_iter_recurse(&dict_i, &variant_i);
 
         if (dbus_message_iter_get_arg_type(&variant_i) == DBUS_TYPE_STRING && pa_streq(key, "Address")) {
-            char *value;
+            const char *value;
 
             if (is_property_change) {
                 pa_log_warn("Adapter property 'Address' expected to be constant but changed for %s, ignoring", a->path);