summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSlawomir Bochenski <lkslawek@gmail.com>2011-05-26 09:17:40 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2011-06-01 14:41:01 +0300
commitf8e0916e2d8687bd0a7db7591829550c949d8142 (patch)
treeb3daec995569b009d5f37af736190491a7ab5580 /tools
parent3b7e90d9db2df4fcf287c109e95075755e013d20 (diff)
Remove unnecessary jumps
Diffstat (limited to 'tools')
-rw-r--r--tools/hciattach_ti.c9
-rw-r--r--tools/sdptool.c3
2 files changed, 5 insertions, 7 deletions
diff --git a/tools/hciattach_ti.c b/tools/hciattach_ti.c
index e107a65e..62691813 100644
--- a/tools/hciattach_ti.c
+++ b/tools/hciattach_ti.c
@@ -119,7 +119,7 @@ static FILE *bts_load_script(const char* file_name, uint32_t* version)
fp = fopen(file_name, "rb");
if (!fp) {
perror("can't open firmware file");
- goto out;
+ return NULL;
}
if (1 != fread(&header, sizeof(struct bts_header), 1, fp)) {
@@ -135,13 +135,12 @@ static FILE *bts_load_script(const char* file_name, uint32_t* version)
if (NULL != version)
*version = header.version;
- goto out;
+ return fp;
errclose:
fclose(fp);
- fp = NULL;
-out:
- return fp;
+
+ return NULL;
}
static unsigned long bts_fetch_action(FILE* fp, unsigned char* action_buf,
diff --git a/tools/sdptool.c b/tools/sdptool.c
index 140a46a2..aea49547 100644
--- a/tools/sdptool.c
+++ b/tools/sdptool.c
@@ -4116,10 +4116,9 @@ static int cmd_records(int argc, char **argv)
context.handle = base[i] + n;
err = get_service(&bdaddr, &context, 1);
if (err < 0)
- goto done;
+ return 0;
}
-done:
return 0;
}