summaryrefslogtreecommitdiffstats
path: root/hcid/storage.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2006-10-27 14:43:23 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2006-10-27 14:43:23 +0000
commit488f561448d08ef5d30902a9f3511b801eff83e8 (patch)
tree3cc13a46e03ffd02378af0095ff497d4a4589a87 /hcid/storage.c
parent065bfb79abbd17ec14bef3daa5276835a9bb213d (diff)
Fix local and remote name validity checking
Diffstat (limited to 'hcid/storage.c')
-rw-r--r--hcid/storage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hcid/storage.c b/hcid/storage.c
index f321ab35..805e35e0 100644
--- a/hcid/storage.c
+++ b/hcid/storage.c
@@ -121,7 +121,7 @@ int write_local_name(bdaddr_t *bdaddr, char *name)
memset(str, 0, sizeof(str));
for (i = 0; i < 248 && name[i]; i++)
- if (name[i] < 32 || name[i] == 127)
+ if ((unsigned char) name[i] < 32 || name[i] == 127)
str[i] = '.';
else
str[i] = name[i];
@@ -232,7 +232,7 @@ int write_device_name(bdaddr_t *local, bdaddr_t *peer, char *name)
memset(str, 0, sizeof(str));
for (i = 0; i < 248 && name[i]; i++)
- if (name[i] < 32 || name[i] == 127)
+ if ((unsigned char) name[i] < 32 || name[i] == 127)
str[i] = '.';
else
str[i] = name[i];