OSDN Git Service

android/client: Don't align name property while printing
authorSzymon Janc <szymon.janc@tieto.com>
Thu, 31 Oct 2013 13:22:01 +0000 (14:22 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 31 Oct 2013 13:48:07 +0000 (15:48 +0200)
Received name property is guaranteed to be NULL terminated so there is
no need to use length specifier. This also fix really long space while
printing due to text alignment to the right.

android/client/if-bt.c

index 16bd882..c9681fc 100644 (file)
@@ -88,8 +88,7 @@ static char *btproperty2str(bt_property_t property)
        switch (property.type) {
        case BT_PROPERTY_BDNAME:
        case BT_PROPERTY_REMOTE_FRIENDLY_NAME:
-               sprintf(p, "%*s", property.len,
-                                       ((bt_bdname_t *) property.val)->name);
+               sprintf(p, "%s", ((bt_bdname_t *) property.val)->name);
                break;
 
        case BT_PROPERTY_BDADDR: