diff --git a/lib/sdp.c b/lib/sdp.c
index dfc06b6..34b0dbb 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
#define SDPDBG(fmt...)
#endif
-static uint128_t bluetooth_base_uuid = {
+static const uint128_t bluetooth_base_uuid = {
.data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB }
};
/* Message structure. */
struct tupla {
int index;
- char *str;
+ const char *str;
};
-static struct tupla Protocol[] = {
+static const struct tupla Protocol[] = {
{ SDP_UUID, "SDP" },
{ UDP_UUID, "UDP" },
{ RFCOMM_UUID, "RFCOMM" },
{ 0 }
};
-static struct tupla ServiceClass[] = {
+static const struct tupla ServiceClass[] = {
{ SDP_SERVER_SVCLASS_ID, "SDP Server" },
{ BROWSE_GRP_DESC_SVCLASS_ID, "Browse Group Descriptor" },
{ PUBLIC_BROWSE_GROUP, "Public Browse Group" },
#define Profile ServiceClass
-static char *string_lookup(struct tupla *pt0, int index)
+static const char *string_lookup(const struct tupla *pt0, int index)
{
- struct tupla *pt;
+ const struct tupla *pt;
for (pt = pt0; pt->index; pt++)
if (pt->index == index)
return "";
}
-static char *string_lookup_uuid(struct tupla *pt0, const uuid_t *uuid)
+static const char *string_lookup_uuid(const struct tupla *pt0,
+ const uuid_t *uuid)
{
uuid_t tmp_uuid;
* Prints into a string the Protocol UUID
* coping a maximum of n characters.
*/
-static int uuid2str(struct tupla *message, const uuid_t *uuid, char *str, size_t n)
+static int uuid2str(const struct tupla *message, const uuid_t *uuid, char *str,
+ size_t n)
{
- char *str2;
+ const char *str2;
if (!uuid) {
snprintf(str, n, "NULL");
*/
int sdp_uuid128_to_uuid(uuid_t *uuid)
{
- uint128_t *b = &bluetooth_base_uuid;
+ const uint128_t *b = &bluetooth_base_uuid;
uint128_t *u = &uuid->value.uuid128;
uint32_t data;
unsigned int i;