summaryrefslogtreecommitdiffstats
path: root/src/hci
diff options
context:
space:
mode:
Diffstat (limited to 'src/hci')
-rw-r--r--src/hci/commands/fcmgmt_cmd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hci/commands/fcmgmt_cmd.c b/src/hci/commands/fcmgmt_cmd.c
index 3a4e28469..98647c134 100644
--- a/src/hci/commands/fcmgmt_cmd.c
+++ b/src/hci/commands/fcmgmt_cmd.c
@@ -144,12 +144,11 @@ static int fcels_exec ( int argc, char **argv ) {
}
} else {
/* Use first port */
- if ( list_empty ( &fc_ports ) ) {
+ port = list_first_entry ( &fc_ports, struct fc_port, list );
+ if ( ! port ) {
printf ( "No ports\n" );
return 1;
}
- list_for_each_entry ( port, &fc_ports, list )
- break;
}
assert ( port != NULL );