diff options
author | Travis Reitter <treitter@gmail.com> | 2010-07-10 05:17:15 +0800 |
---|---|---|
committer | Travis Reitter <treitter@gmail.com> | 2010-07-21 07:12:37 +0800 |
commit | b22ad13080a14191a8e33c92bc8332b40674824c (patch) | |
tree | d94bf1599f39dfb5451d8a28f137ed7e9ef6e017 | |
parent | adf158ac3343088b4553b192b55ad0da5c629b71 (diff) | |
download | gsoc2013-empathy-b22ad13080a14191a8e33c92bc8332b40674824c.tar gsoc2013-empathy-b22ad13080a14191a8e33c92bc8332b40674824c.tar.gz gsoc2013-empathy-b22ad13080a14191a8e33c92bc8332b40674824c.tar.bz2 gsoc2013-empathy-b22ad13080a14191a8e33c92bc8332b40674824c.tar.lz gsoc2013-empathy-b22ad13080a14191a8e33c92bc8332b40674824c.tar.xz gsoc2013-empathy-b22ad13080a14191a8e33c92bc8332b40674824c.tar.zst gsoc2013-empathy-b22ad13080a14191a8e33c92bc8332b40674824c.zip |
Use explicit '!= NULL' for pointer boolean expressions.
-rw-r--r-- | libempathy-gtk/empathy-individual-store.c | 4 | ||||
-rw-r--r-- | libempathy-gtk/empathy-individual-view.c | 21 |
2 files changed, 13 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c index e8df8394f..b8100ec9e 100644 --- a/libempathy-gtk/empathy-individual-store.c +++ b/libempathy-gtk/empathy-individual-store.c @@ -312,7 +312,7 @@ individual_store_remove_individual (EmpathyIndividualStore *self, priv = GET_PRIV (self); iters = individual_store_find_contact (self, individual); - if (!iters) + if (iters == NULL) { return; } @@ -376,7 +376,7 @@ individual_store_add_individual (EmpathyIndividualStore *self, flags = empathy_individual_manager_get_flags_for_connection (manager, connection); - if (!groups) + if (groups == NULL) { GtkTreeIter iter_group, *parent; diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c index d6aec8271..b2dc22a26 100644 --- a/libempathy-gtk/empathy-individual-view.c +++ b/libempathy-gtk/empathy-individual-view.c @@ -302,7 +302,7 @@ individual_view_query_tooltip_cb (EmpathyIndividualView *view, if (contact == NULL) goto OUT; - if (!priv->tooltip_widget) + if (priv->tooltip_widget == NULL) { priv->tooltip_widget = empathy_contact_widget_new (contact, EMPATHY_CONTACT_WIDGET_FOR_TOOLTIP | @@ -479,7 +479,7 @@ individual_view_file_drag_received (GtkWidget *view, gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, EMPATHY_INDIVIDUAL_STORE_COL_INDIVIDUAL, &individual, -1); - if (!individual) + if (individual == NULL) { return FALSE; } @@ -567,12 +567,12 @@ individual_view_drag_motion (GtkWidget *widget, is_row = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (widget), x, y, &path, NULL, NULL, NULL); - cleanup &= (!dm); + cleanup &= (dm == NULL); if (is_row) { cleanup &= (dm && gtk_tree_path_compare (dm->path, path) != 0); - is_different = (!dm || (dm + is_different = ((dm == NULL) || ((dm != NULL) && gtk_tree_path_compare (dm->path, path) != 0)); } else @@ -735,13 +735,13 @@ individual_view_drag_data_get (GtkWidget *widget, priv = GET_PRIV (widget); model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget)); - if (!priv->drag_row) + if (priv->drag_row == NULL) { return; } src_path = gtk_tree_row_reference_get_path (priv->drag_row); - if (!src_path) + if (src_path == NULL) { return; } @@ -756,7 +756,7 @@ individual_view_drag_data_get (GtkWidget *widget, individual = empathy_individual_view_dup_selected (EMPATHY_INDIVIDUAL_VIEW (widget)); - if (!individual) + if (individual == NULL) { return; } @@ -895,7 +895,7 @@ individual_view_row_activated (GtkTreeView *view, gtk_tree_model_get (model, &iter, EMPATHY_INDIVIDUAL_STORE_COL_INDIVIDUAL, &individual, -1); - if (!individual) + if (individual == NULL) return; contact = empathy_contact_dup_from_folks_individual (individual); @@ -2089,10 +2089,11 @@ empathy_individual_view_get_individual_menu (EmpathyIndividualView *view) g_return_val_if_fail (EMPATHY_IS_INDIVIDUAL_VIEW (view), NULL); individual = empathy_individual_view_dup_selected (view); - if (!individual) + if (individual == NULL) { return NULL; } + flags = empathy_individual_view_get_flags (view); menu = empathy_individual_menu_new (individual, priv->individual_features); @@ -2104,7 +2105,7 @@ empathy_individual_view_get_individual_menu (EmpathyIndividualView *view) { /* create the menu if required, or just add a separator */ - if (!menu) + if (menu == NULL) { menu = gtk_menu_new (); } |