RE: [PATCH ] tools/gatt-client: print read/write error messages

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

 



Hi Johan,

> -----Original Message-----
> From: linux-bluetooth-owner@xxxxxxxxxxxxxxx [mailto:linux-bluetooth-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Johan Hedberg
> Sent: Thursday, February 12, 2015 8:28 PM
> To: Bharat Panda
> Cc: linux-bluetooth@xxxxxxxxxxxxxxx; cpgs@xxxxxxxxxxx
> Subject: Re: [PATCH ] tools/gatt-client: print read/write error messages
> 
> Hi Bharat,
> 
> On Thu, Feb 12, 2015, Bharat Panda wrote:
> > +static char *ecode_to_string(uint8_t ecode)
> 
> This should be static const char *
> 
> > +{
> > +	char *err = NULL;
> > +
> > +	switch (ecode) {
> > +		case BT_ATT_ERROR_INVALID_HANDLE:
> > +			err = "ERROR: Invalid Handle";
> > +			break;
> 
> First of all, please follow the coding style: the case statement should
start at
> the same indentation as the switch. Secondly, you can make this all more
> compact by removing the err variable:
> 
> 	case BT_ATT_ERROR_INVALID_HANDLE:
> 		return "Invalid Handle";
> 	case ...:
> 		return "...";
I have incorporated above review comments and submitted another version of
the patch.

Thanks.

Best Regards,
Bharat 


--
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