diff options
author | Stephen Crane <steve.crane@rococosoft.com> | 2003-02-11 10:22:23 +0000 |
---|---|---|
committer | Stephen Crane <steve.crane@rococosoft.com> | 2003-02-11 10:22:23 +0000 |
commit | 109bfa547ab9e24672472371e2183dcec24d0058 (patch) | |
tree | 55dcd30597464569faff8ffc70874260b1f80676 /src/bluetooth.c | |
parent | bff9ecffc1771df893e0cccc59fe708cf9ba43bb (diff) |
add const to fn sigs; fns to auth and enc links
Diffstat (limited to 'src/bluetooth.c')
-rw-r--r-- | src/bluetooth.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bluetooth.c b/src/bluetooth.c index 4548b121..bc0eb238 100644 --- a/src/bluetooth.c +++ b/src/bluetooth.c @@ -35,16 +35,16 @@ #include <bluetooth.h> #include <hci.h> -void baswap(bdaddr_t *dst, bdaddr_t *src) +void baswap(bdaddr_t *dst, const bdaddr_t *src) { - register unsigned char * d = (unsigned char *)dst; - register unsigned char * s = (unsigned char *)src; + register unsigned char *d = (unsigned char *)dst; + register const unsigned char *s = (const unsigned char *)src; register int i; for(i=0; i<6; i++) d[i] = s[5-i]; } -char *batostr(bdaddr_t *ba) +char *batostr(const bdaddr_t *ba) { char *str = malloc(18); if (!str) @@ -56,9 +56,9 @@ char *batostr(bdaddr_t *ba) return str; } -bdaddr_t *strtoba(char *str) +bdaddr_t *strtoba(const char *str) { - char *ptr = str; + const char *ptr = str; int i; uint8_t *ba = malloc(sizeof(bdaddr_t)); @@ -74,7 +74,7 @@ bdaddr_t *strtoba(char *str) return (bdaddr_t *) ba; } -int ba2str(bdaddr_t *ba, char *str) +int ba2str(const bdaddr_t *ba, char *str) { uint8_t b[6]; @@ -83,10 +83,10 @@ int ba2str(bdaddr_t *ba, char *str) b[0], b[1], b[2], b[3], b[4], b[5]); } -int str2ba(char *str, bdaddr_t *ba) +int str2ba(const char *str, bdaddr_t *ba) { uint8_t b[6]; - char *ptr = str; + const char *ptr = str; int i; for (i=0; i < 6; i++) { |