Re: [PATCH 2/2] monitor/rfcomm: Fix frame names formatting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

On Sat, Nov 14, 2015 at 2:20 PM, Johan Hedberg <johan.hedberg@xxxxxxxxx> wrote:
> Hi Andrzej,
>
> On Sat, Nov 14, 2015, Andrzej Kaczmarek wrote:
>> ---
>>  monitor/rfcomm.c | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/monitor/rfcomm.c b/monitor/rfcomm.c
>> index bdf4000..91f0c39 100644
>> --- a/monitor/rfcomm.c
>> +++ b/monitor/rfcomm.c
>> @@ -422,10 +422,10 @@ struct rfcomm_data {
>>
>>  static const struct rfcomm_data rfcomm_table[] = {
>>       { 0x2f, "Set Async Balance Mode (SABM) " },
>> -     { 0x63, "Unnumbered Ack (UA)" },
>> -     { 0x0f, "Disconnect Mode (DM)" },
>> -     { 0x43, "Disconnect (DISC)" },
>> -     { 0xef, "Unnumbered Info with Header Check (UIH)" },
>> +     { 0x63, "Unnumbered Ack (UA) " },
>> +     { 0x0f, "Disconnect Mode (DM) " },
>> +     { 0x43, "Disconnect (DISC) " },
>> +     { 0xef, "Unnumbered Info with Header Check (UIH) " },
>
> I don't see any other users of print_indent() using this kind of extra
> space at the end of the strings. Why would RFCOMM need it if the other's
> don't?
>
> In general, I think it's a bad idea to have formatting details like this
> in the lookup table since that makes it more difficult to reuse the
> string in various scenarios. Instead, the needed spacing should be done
> in the format string that's used in the printf (or similar) function.

Agree, I actually fixed one more similar formatting issue (in a good
way this time) so will send v2 with both changes together.

BR,
Andrzej
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux