diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-08-07 11:05:04 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-08-15 00:14:53 -0400 |
commit | 09d5d4aa647367eeb42352a2bc9d438b9c703670 (patch) | |
tree | e6af8e3d2e5094a18e0bfd1f956e05ff401b06f4 /net/bluetooth | |
parent | e6dd548b9a3c7b3fcdd2fd97880abf7597e8334b (diff) |
Bluetooth: trivial: Shorten variable scope
Make code more clear by moving sk and bt vars to the place where
they are actually used.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/af_bluetooth.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 58f9762b339a..1b88fe41f4b1 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -567,8 +567,6 @@ static void bt_seq_stop(struct seq_file *seq, void *v) | |||
567 | 567 | ||
568 | static int bt_seq_show(struct seq_file *seq, void *v) | 568 | static int bt_seq_show(struct seq_file *seq, void *v) |
569 | { | 569 | { |
570 | struct sock *sk; | ||
571 | struct bt_sock *bt; | ||
572 | struct bt_seq_state *s = seq->private; | 570 | struct bt_seq_state *s = seq->private; |
573 | struct bt_sock_list *l = s->l; | 571 | struct bt_sock_list *l = s->l; |
574 | bdaddr_t src_baswapped, dst_baswapped; | 572 | bdaddr_t src_baswapped, dst_baswapped; |
@@ -583,8 +581,8 @@ static int bt_seq_show(struct seq_file *seq, void *v) | |||
583 | 581 | ||
584 | seq_putc(seq, '\n'); | 582 | seq_putc(seq, '\n'); |
585 | } else { | 583 | } else { |
586 | sk = sk_entry(v); | 584 | struct sock *sk = sk_entry(v); |
587 | bt = bt_sk(sk); | 585 | struct bt_sock *bt = bt_sk(sk); |
588 | baswap(&src_baswapped, &bt->src); | 586 | baswap(&src_baswapped, &bt->src); |
589 | baswap(&dst_baswapped, &bt->dst); | 587 | baswap(&dst_baswapped, &bt->dst); |
590 | 588 | ||