[gnome-panel] run-dialog: remove unneeded NULL checks



commit b225098ac49f5ff150c65aeae7c10b9c6d3716ff
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Mar 21 15:00:35 2021 +0200

    run-dialog: remove unneeded NULL checks
    
    gtk_entry_get_text does not return NULL.
    
    Coverity CID: #1445701

 gnome-panel/panel-run-dialog.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnome-panel/panel-run-dialog.c b/gnome-panel/panel-run-dialog.c
index ee8da5976..6b3d31daa 100644
--- a/gnome-panel/panel-run-dialog.c
+++ b/gnome-panel/panel-run-dialog.c
@@ -514,7 +514,7 @@ panel_run_dialog_execute (PanelRunDialog *dialog)
        command = g_strdup (panel_run_dialog_get_combo_text (dialog));
        command = g_strchug (command);
 
-       if (!command || !command [0]) {
+       if (command[0] == '\0') {
                g_free (command);
                return;
        }
@@ -1680,7 +1680,7 @@ combobox_changed (GtkComboBox    *combobox,
        }
 
        /* desensitize run button if no text entered */
-       if (!start || !start [0]) {
+       if (start[0] == '\0') {
                g_free (text);
 
                gtk_widget_set_sensitive (dialog->run_button, FALSE);
@@ -1852,8 +1852,8 @@ panel_run_dialog_create_desktop_file (PanelRunDialog *dialog)
        char     *save_uri;
 
         text = g_strdup (panel_run_dialog_get_combo_text (dialog));
-       
-       if (!text || !text [0]) {
+
+       if (text[0] == '\0') {
                g_free (text);
                return NULL;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]