summaryrefslogtreecommitdiffstats
path: root/hcid/security.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-09-20 10:21:18 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-09-20 10:21:18 +0000
commit62e966161b2fae86eb3e7966b7b5d71d241c86bb (patch)
tree3538909d133b18711da9fb04c252aa8fd648b5e2 /hcid/security.c
parent8ee8041f8ad6aeb75ff9d9dba3d27d6663da247a (diff)
Add necessary cast to last parameter of g_utf8_validate
Diffstat (limited to 'hcid/security.c')
-rw-r--r--hcid/security.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hcid/security.c b/hcid/security.c
index 1b14dfac..55d38dff 100644
--- a/hcid/security.c
+++ b/hcid/security.c
@@ -468,7 +468,9 @@ static inline void remote_name_information(int dev, bdaddr_t *sba, void *ptr)
if (!evt->status) {
char *end;
memcpy(name, evt->name, 248);
- if (!g_utf8_validate(name, -1, &end))
+ /* It's ok to cast end between const and non-const since
+ * we know it points to inside of name which is non-const */
+ if (!g_utf8_validate(name, -1, (const char **) &end))
*end = '\0';
write_device_name(sba, &dba, name);
}