diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-01-27 20:13:19 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-01-27 20:13:19 +0000 |
commit | 917543004017da0f09304844c578b59ca4a1802b (patch) | |
tree | 5747d97dfdf2f85aae9279a3559736bd0620af78 /test/l2test.c | |
parent | 54c95138efbc91165d50ee0e3e1fd906493bf68f (diff) |
Another bunch of cleanups
Diffstat (limited to 'test/l2test.c')
-rw-r--r-- | test/l2test.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/test/l2test.c b/test/l2test.c index 30d9a2e6..70b7b1fa 100644 --- a/test/l2test.c +++ b/test/l2test.c @@ -662,10 +662,8 @@ static void usage(void) int main(int argc ,char *argv[]) { - int opt, mode, s, need_addr; struct sigaction sa; - - mode = RECV; need_addr = 0; + int opt, sk, mode = RECV, need_addr = 0; bacpy(&bdaddr, BDADDR_ANY); @@ -807,10 +805,10 @@ int main(int argc ,char *argv[]) break; case CRECV: - s = do_connect(argv[optind]); - if (s < 0) + sk = do_connect(argv[optind]); + if (sk < 0) exit(1); - recv_mode(s); + recv_mode(sk); break; case DUMP: @@ -818,10 +816,10 @@ int main(int argc ,char *argv[]) break; case SEND: - s = do_connect(argv[optind]); - if (s < 0) + sk = do_connect(argv[optind]); + if (sk < 0) exit(1); - send_mode(s); + send_mode(sk); break; case LSEND: @@ -841,10 +839,10 @@ int main(int argc ,char *argv[]) break; case SENDDUMP: - s = do_connect(argv[optind]); - if (s < 0) + sk = do_connect(argv[optind]); + if (sk < 0) exit(1); - senddump_mode(s); + senddump_mode(sk); break; case LSENDDUMP: |