diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2019-08-02 15:25:13 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2019-08-02 16:26:34 +0200 |
commit | 50ae9c936cd5d0838c68123655feb05c1267e89e (patch) | |
tree | 56ea5d4a1744b547eaeda9d54cc7d63e30fda587 | |
parent | a32976568c13e22dd560610374782250f4d4ba9e (diff) | |
download | NetworkManager-50ae9c936cd5d0838c68123655feb05c1267e89e.tar.gz |
tui: newt: remove NULL checks after dereference
priv->start_buttons and priv->end_buttons are initialized at
construction and never changed and so the checks are not needed.
-rw-r--r-- | clients/tui/newt/nmt-newt-button-box.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clients/tui/newt/nmt-newt-button-box.c b/clients/tui/newt/nmt-newt-button-box.c index 79222c9ae4..c69c191152 100644 --- a/clients/tui/newt/nmt-newt-button-box.c +++ b/clients/tui/newt/nmt-newt-button-box.c @@ -262,12 +262,10 @@ nmt_newt_button_box_size_request (NmtNewtWidget *widget, size_request_buttons (bbox, priv->start_buttons, width, height); size_request_buttons (bbox, priv->end_buttons, width, height); - if (priv->start_buttons && priv->end_buttons) { - if (priv->orientation == NMT_NEWT_BUTTON_BOX_HORIZONTAL) - *width += 1; - else - *height += 1; - } + if (priv->orientation == NMT_NEWT_BUTTON_BOX_HORIZONTAL) + *width += 1; + else + *height += 1; } static void |