diff options
author | Anderson Lizardo <anderson.lizardo@openbossa.org> | 2012-08-21 11:49:24 -0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-08-26 09:37:06 +0100 |
commit | 78889501f814ebccf54754bbe630c8ba202149b6 (patch) | |
tree | a861aff1ec49c9f7cd1caec7386554f9db4502ef /tools/hciattach_ti.c | |
parent | 58d04ad2f1e418745266a2da955d34b81734fae4 (diff) | |
download | bluez-78889501f814ebccf54754bbe630c8ba202149b6.tar.gz |
Fix trivial coding style issues on pointer declarations and casting
Avoid using C++ style pointer declarations like "char* ptr", as most
BlueZ code uses "char *ptr".
Diffstat (limited to 'tools/hciattach_ti.c')
-rw-r--r-- | tools/hciattach_ti.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/hciattach_ti.c b/tools/hciattach_ti.c index 158e56806..b57c6b776 100644 --- a/tools/hciattach_ti.c +++ b/tools/hciattach_ti.c @@ -109,10 +109,10 @@ struct bts_action_serial { uint32_t flow_control; }__attribute__ ((packed)); -static FILE *bts_load_script(const char* file_name, uint32_t* version) +static FILE *bts_load_script(const char *file_name, uint32_t *version) { struct bts_header header; - FILE* fp; + FILE *fp; fp = fopen(file_name, "rb"); if (!fp) { @@ -141,8 +141,8 @@ errclose: return NULL; } -static unsigned long bts_fetch_action(FILE* fp, unsigned char* action_buf, - unsigned long buf_size, uint16_t* action_type) +static unsigned long bts_fetch_action(FILE *fp, unsigned char *action_buf, + unsigned long buf_size, uint16_t *action_type) { struct bts_action action_hdr; unsigned long nread; @@ -169,7 +169,7 @@ static unsigned long bts_fetch_action(FILE* fp, unsigned char* action_buf, return nread * sizeof(uint8_t); } -static void bts_unload_script(FILE* fp) +static void bts_unload_script(FILE *fp) { if (fp) fclose(fp); @@ -237,7 +237,7 @@ static int brf_set_serial_params(struct bts_action_serial *serial_action, return 0; } -static int brf_send_command_socket(int fd, struct bts_action_send* send_action) +static int brf_send_command_socket(int fd, struct bts_action_send *send_action) { char response[1024] = {0}; hci_command_hdr *cmd = (hci_command_hdr *) send_action->data; @@ -267,7 +267,8 @@ static int brf_send_command_socket(int fd, struct bts_action_send* send_action) return 0; } -static int brf_send_command_file(int fd, struct bts_action_send* send_action, long size) +static int brf_send_command_file(int fd, struct bts_action_send *send_action, + long size) { unsigned char response[1024] = {0}; long ret = 0; @@ -296,7 +297,8 @@ static int brf_send_command_file(int fd, struct bts_action_send* send_action, lo } -static int brf_send_command(int fd, struct bts_action_send* send_action, long size, int hcill_installed) +static int brf_send_command(int fd, struct bts_action_send *send_action, + long size, int hcill_installed) { int ret = 0; char *fixed_action; @@ -320,7 +322,9 @@ static int brf_do_action(uint16_t brf_type, uint8_t *brf_action, long brf_size, switch (brf_type) { case ACTION_SEND_COMMAND: DPRINTF("W"); - ret = brf_send_command(fd, (struct bts_action_send*) brf_action, brf_size, hcill_installed); + ret = brf_send_command(fd, + (struct bts_action_send *) brf_action, + brf_size, hcill_installed); break; case ACTION_WAIT_EVENT: DPRINTF("R"); |