diff options
author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-05-18 20:39:10 +0000 |
---|---|---|
committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-05-18 20:39:10 +0000 |
commit | 68f208cc3b17f8e26318ba411a0974d9489249c9 (patch) | |
tree | 2d9e022290ac76b1b315bb4da957a0cc96fcd303 /serial/storage.c | |
parent | aab0210d3c33296381cff7f988a30f75f058ae8c (diff) |
serial: code standard - use int16_t for dev_id
Diffstat (limited to 'serial/storage.c')
-rw-r--r-- | serial/storage.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/serial/storage.c b/serial/storage.c index e6d73827..46e63f5d 100644 --- a/serial/storage.c +++ b/serial/storage.c @@ -38,7 +38,7 @@ #include "storage.h" -int port_delete(bdaddr_t *src, bdaddr_t *dst, int id) +int port_delete(bdaddr_t *src, bdaddr_t *dst, int16_t id) { char filename[PATH_MAX + 1]; char src_addr[18], dst_addr[18]; @@ -48,12 +48,12 @@ int port_delete(bdaddr_t *src, bdaddr_t *dst, int id) ba2str(dst, dst_addr); create_name(filename, PATH_MAX, STORAGEDIR, src_addr, "serial"); - snprintf(key, sizeof(key), "%s#%d", dst_addr, id); + snprintf(key, sizeof(key), "%s#%hd", dst_addr, id); return textfile_del(filename, key); } -int port_store(bdaddr_t *src, bdaddr_t *dst, int id, +int port_store(bdaddr_t *src, bdaddr_t *dst, int16_t id, uint8_t ch, const char *svcname) { char filename[PATH_MAX + 1]; @@ -74,7 +74,7 @@ int port_store(bdaddr_t *src, bdaddr_t *dst, int id, size = strlen(svcname) + 3; value = g_malloc0(size); - snprintf(key, 32, "%s#%d", dst_addr, id); + snprintf(key, 32, "%s#%hd", dst_addr, id); snprintf(value, size, "%d:%s", ch, svcname); err = textfile_put(filename, key, value); |