From 99c8e30c029f9af2e85a74a93b740b767c7d72ef Mon Sep 17 00:00:00 2001 From: Daniel Boles Date: Tue, 15 Aug 2017 15:15:08 +0100 Subject: [PATCH] ScrolledWindow: Bin unreachable ternary branches We already checked that the child is not NULL above. Coverity CID 1454191 --- gtk/gtkscrolledwindow.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index a0b59dcc74..400c542b94 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -1540,19 +1540,12 @@ gtk_scrolled_window_allocate (GtkCssGadget *gadget, { gint child_scroll_width; gint child_scroll_height; - GtkScrollablePolicy hscroll_policy; - GtkScrollablePolicy vscroll_policy; gboolean previous_hvis; gboolean previous_vvis; guint count = 0; GtkScrollable *scrollable_child = GTK_SCROLLABLE (child); - - hscroll_policy = scrollable_child != NULL - ? gtk_scrollable_get_hscroll_policy (scrollable_child) - : GTK_SCROLL_MINIMUM; - vscroll_policy = scrollable_child != NULL - ? gtk_scrollable_get_vscroll_policy (scrollable_child) - : GTK_SCROLL_MINIMUM; + GtkScrollablePolicy hscroll_policy = gtk_scrollable_get_hscroll_policy (scrollable_child); + GtkScrollablePolicy vscroll_policy = gtk_scrollable_get_vscroll_policy (scrollable_child); /* Determine scrollbar visibility first via hfw apis */ if (gtk_widget_get_request_mode (child) == GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH)