androi/haltest: Make debug functions return const string

This commit is contained in:
Andrei Emeltchenko 2013-11-08 16:08:49 +02:00 committed by Johan Hedberg
parent 0d45c38c00
commit bec0539ba9
2 changed files with 6 additions and 6 deletions

View File

@ -137,7 +137,7 @@ int int2str_findstr(const char *str, const struct int2str m[])
*
* returns buf
*/
char *bt_bdaddr_t2str(const bt_bdaddr_t *bd_addr, char *buf)
const char *bt_bdaddr_t2str(const bt_bdaddr_t *bd_addr, char *buf)
{
const uint8_t *p = bd_addr->address;
@ -196,14 +196,14 @@ const char *enum_one_string(void *v, int i)
return (i == 0) && (m[0] != 0) ? m : NULL;
}
char *bdaddr2str(const bt_bdaddr_t *bd_addr)
const char *bdaddr2str(const bt_bdaddr_t *bd_addr)
{
static char buf[MAX_ADDR_STR_LEN];
return bt_bdaddr_t2str(bd_addr, buf);
}
char *btproperty2str(const bt_property_t *property)
const char *btproperty2str(const bt_property_t *property)
{
static char buf[4096];
char *p;

View File

@ -100,13 +100,13 @@ static struct int2str __##type##2str[] = {
/* End of mapping section */
#define MAX_ADDR_STR_LEN 18
char *bt_bdaddr_t2str(const bt_bdaddr_t *bd_addr, char *buf);
const char *bt_bdaddr_t2str(const bt_bdaddr_t *bd_addr, char *buf);
void str2bt_bdaddr_t(const char *str, bt_bdaddr_t *bd_addr);
void str2bt_uuid_t(const char *str, bt_uuid_t *uuid);
char *btproperty2str(const bt_property_t *property);
char *bdaddr2str(const bt_bdaddr_t *bd_addr);
const char *btproperty2str(const bt_property_t *property);
const char *bdaddr2str(const bt_bdaddr_t *bd_addr);
DECINTMAP(bt_status_t);
DECINTMAP(bt_state_t);