From cd3c2f4553f570694020cc00dd548e0ae66d2755 Mon Sep 17 00:00:00 2001 From: Konstantin Kharlamov Date: Sat, 27 Oct 2018 21:09:34 +0300 Subject: seat: don't traverse the list to check if it's empty Found by introspection. Signed-off-by: Konstantin Kharlamov --- sway/input/seat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/input/seat.c b/sway/input/seat.c index 9d4dc7af..64419afa 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -948,7 +948,7 @@ struct sway_node *seat_get_focus(struct sway_seat *seat) { if (!seat->has_focus) { return NULL; } - if (wl_list_length(&seat->focus_stack) == 0) { + if (wl_list_empty(&seat->focus_stack)) { return NULL; } struct sway_seat_node *current = -- cgit v1.2.3-54-g00ecf