soylent r110 - trunk/src
- From: treitter svn gnome org
- To: svn-commits-list gnome org
- Subject: soylent r110 - trunk/src
- Date: Tue, 1 Apr 2008 06:30:36 +0100 (BST)
Author: treitter
Date: Tue Apr 1 06:30:36 2008
New Revision: 110
URL: http://svn.gnome.org/viewvc/soylent?rev=110&view=rev
Log:
Prefer 'foo' to '(foo \!= NULL)' and '\!foo' to 'foo == NULL' for syntactical simplicity
Modified:
trunk/src/eds-utils.c
trunk/src/soylent-browser-eds.c
trunk/src/soylent-browser-person-view.c
trunk/src/soylent-browser.c
trunk/src/soylent-person.c
trunk/src/soylent-utils.c
Modified: trunk/src/eds-utils.c
==============================================================================
--- trunk/src/eds-utils.c (original)
+++ trunk/src/eds-utils.c Tue Apr 1 06:30:36 2008
@@ -41,7 +41,7 @@
GdkPixbuf *pixbuf = NULL;
GdkPixbufLoader *loader = NULL;
- g_return_val_if_fail (photo != NULL, retval);
+ g_return_val_if_fail (photo, retval);
g_return_val_if_fail (photo->type == E_CONTACT_PHOTO_TYPE_INLINED, retval);
g_return_val_if_fail (icon_width_max > 0, retval);
g_return_val_if_fail (icon_height_max > 0, retval);
@@ -120,7 +120,7 @@
{
const gchar *retval = NULL;
- g_return_val_if_fail (e_contact != NULL, retval);
+ g_return_val_if_fail (e_contact, retval);
g_return_val_if_fail (E_IS_CONTACT (e_contact), retval);
retval = e_contact_get_const (e_contact, E_CONTACT_FULL_NAME);
@@ -163,11 +163,11 @@
EVCardAttribute *attr = NULL;
GList *type_existing = NULL;
- g_return_val_if_fail (e_contact != NULL, retval);
+ g_return_val_if_fail (e_contact, retval);
g_return_val_if_fail (E_IS_CONTACT (e_contact), retval);
g_return_val_if_fail (field_id >= E_CONTACT_FIELD_FIRST, retval);
g_return_val_if_fail (field_id < E_CONTACT_FIELD_LAST, retval);
- g_return_val_if_fail (type != NULL, retval);
+ g_return_val_if_fail (type, retval);
g_return_val_if_fail (!g_str_equal (type, ""), retval);
g_return_val_if_fail (abs_num >= 0, retval);
/* value may be NULL */
@@ -234,8 +234,8 @@
gboolean retval = FALSE;
gchar *value_copy = NULL;
- g_return_val_if_fail (addr != NULL, retval);
- g_return_val_if_fail (field_name != NULL, retval);
+ g_return_val_if_fail (addr, retval);
+ g_return_val_if_fail (field_name, retval);
value_copy = g_strdup (value);
@@ -284,7 +284,7 @@
{
gboolean retval = TRUE;
- g_return_val_if_fail (addr != NULL, retval);
+ g_return_val_if_fail (addr, retval);
if (TRUE
&& STRING_NULL_OR_EMPTY (addr->address_format)
@@ -314,7 +314,7 @@
gchar *retval = NULL;
GString *label = NULL;
- g_return_val_if_fail (addr != NULL, retval);
+ g_return_val_if_fail (addr, retval);
/* An empty address should get an empty label */
g_return_val_if_fail (!e_contact_address_is_empty (addr), retval);
@@ -344,7 +344,7 @@
gchar **name_split = NULL;
guint names_num = 0;
- g_return_val_if_fail (full_name != NULL, retval);
+ g_return_val_if_fail (full_name, retval);
g_return_val_if_fail (!g_str_equal (full_name, ""), retval);
/* Construct the X-EVOLUTION-FILE-AS name in the format:
Modified: trunk/src/soylent-browser-eds.c
==============================================================================
--- trunk/src/soylent-browser-eds.c (original)
+++ trunk/src/soylent-browser-eds.c Tue Apr 1 06:30:36 2008
@@ -66,11 +66,11 @@
gboolean retval = FALSE;
GList *e_contact_groups = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), NULL);
*/
- g_return_val_if_fail (e_contact != NULL, retval);
+ g_return_val_if_fail (e_contact, retval);
g_return_val_if_fail (E_IS_CONTACT (e_contact), retval);
/* inverting standard reval logic so we can easily set it FALSE for one or
@@ -120,8 +120,8 @@
GList *c = NULL;
GHashTable *people = NULL;
- g_return_val_if_fail (e_contacts != NULL, retval);
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (e_contacts, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment this once SoylentBrowser is a real GObject
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -147,7 +147,7 @@
e_uid = e_contact_get_const (e_contact, E_CONTACT_UID);
/* If we don't already have an entry for this EContact, add one */
- if ((g_hash_table_lookup (people, e_uid)) == NULL)
+ if (!(g_hash_table_lookup (people, e_uid)))
{
name = display_name_from_e_contact (e_contact);
@@ -215,8 +215,8 @@
GList *c = NULL;
GHashTable *people = NULL;
- g_return_val_if_fail (e_contacts != NULL, retval);
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (e_contacts, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment this once SoylentBrowser is a real GObject
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -304,8 +304,8 @@
GList *i = NULL;
GHashTable *people = NULL;
- g_return_val_if_fail (e_uids != NULL, retval);
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (e_uids, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment this once SoylentBrowser is a real GObject
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -342,7 +342,7 @@
gboolean retval = FALSE;
gboolean live_setup_retval = FALSE;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment this once SoylentBrowser is a real GObject
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -367,7 +367,7 @@
gboolean retval = FALSE;
SoylentBrowser *browser = NULL;
- g_return_if_fail (closure != NULL);
+ g_return_if_fail (closure);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_if_fail (SOYLENT_IS_BROWSER (closure));
*/
@@ -425,7 +425,7 @@
SoylentBrowser *browser = NULL;
EBookQuery *query = NULL;
- g_return_if_fail (closure != NULL);
+ g_return_if_fail (closure);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_if_fail (SOYLENT_IS_BROWSER (closure));
*/
@@ -536,7 +536,7 @@
GError *error = NULL;
EBook *e_book = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment this once SoylentBrowser is a real GObject
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
Modified: trunk/src/soylent-browser-person-view.c
==============================================================================
--- trunk/src/soylent-browser-person-view.c (original)
+++ trunk/src/soylent-browser-person-view.c Tue Apr 1 06:30:36 2008
@@ -135,7 +135,7 @@
SoylentBrowser *browser = NULL;
EBookView *e_book_view = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: when SoylentBrowser is a GObject, check SOYLENT_IS_BROWSER */
browser = (SoylentBrowser*) user_data;
@@ -188,7 +188,7 @@
const GList *i = NULL;
GList *e_uids = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: when SoylentBrowser is a GObject, check SOYLENT_IS_BROWSER */
browser = (SoylentBrowser*) user_data;
@@ -252,7 +252,7 @@
GladeXML *wtree = NULL;
GtkWidget *dia_delete_person_confirm = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: when SoylentBrowser is a GObject, check SOYLENT_IS_BROWSER */
browser = (SoylentBrowser*) user_data;
@@ -278,7 +278,7 @@
GladeXML *wtree = NULL;
GtkWidget *dia_delete_person = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: when SoylentBrowser is a GObject, check SOYLENT_IS_BROWSER */
browser = (SoylentBrowser*) user_data;
@@ -303,7 +303,7 @@
SoylentBrowser *browser = NULL;
SoylentPerson *person = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: when SoylentBrowser is a GObject, check SOYLENT_IS_BROWSER */
browser = (SoylentBrowser*) user_data;
@@ -413,7 +413,7 @@
GladeXML *wtree = NULL;
GtkMenuToolButton *btntb = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -459,7 +459,7 @@
GladeXML *wtree = NULL;
GtkMenuToolButton *btntb = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -490,7 +490,7 @@
GList *selected_people = NULL;
browser = (SoylentBrowser*) user_data;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -546,7 +546,7 @@
GHashTable *edits_pending = NULL;
gpointer value_existing = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -564,7 +564,7 @@
/* Note: if we ever insert values == NULL (which we shouldn't be
* anyhow), this assumes the key doesn't have an entry in the hash */
- if (value_existing == NULL)
+ if (!value_existing)
{
g_hash_table_insert (edits_pending, cb_data->widget_name,
cb_data->field);
@@ -596,7 +596,7 @@
GladeXML *wtree = NULL;
GtkIconView *iv_people = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -677,7 +677,7 @@
GladeXML *wtree = NULL;
GtkMessageDialog *error_chat_new = NULL;
- g_return_if_fail (user_data != NULL);
+ g_return_if_fail (user_data);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_if_fail (SOYLENT_IS_BROWSER (browser));
*/
@@ -714,7 +714,7 @@
gchar *param_val = NULL;
SoylentPerson *person = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -827,7 +827,7 @@
guint num_cbox = ARRAY_LEN (cbox_names);
guint i = 0;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -868,7 +868,7 @@
GtkWidget *align_detail_add = NULL;
gchar *domain = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -946,7 +946,7 @@
GladeXML *wtree = NULL;
GtkWidget *btn_detail_add = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -990,7 +990,7 @@
guint num_entries = ARRAY_LEN (entry_names);
guint i = 0;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -1051,7 +1051,7 @@
GladeXML *wtree = NULL;
GtkWidget *window_person_view = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -1074,7 +1074,7 @@
SoylentBrowser *browser = NULL;
GHashTable *edits_pending = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -1330,7 +1330,7 @@
SoylentPerson *person = NULL;
EmpathyContactManager *live_manager = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -1457,7 +1457,7 @@
GtkMenu *menu_email = NULL;
GList *e_contacts = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -1529,7 +1529,7 @@
GtkMenu *menu_chat = NULL;
GList *people = NULL;
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -1606,8 +1606,8 @@
EContact *e_contact = NULL;
SoylentPerson *person = NULL;
- g_return_val_if_fail (e_contacts != NULL, retval);
- g_return_val_if_fail (pre_person_to_match != NULL, retval);
+ g_return_val_if_fail (e_contacts, retval);
+ g_return_val_if_fail (pre_person_to_match, retval);
/* FIXME: once SoylentBrowser is a GObject, also check SOYLENT_IS_BROWSER */
browser = pre_person_to_match->browser;
@@ -1678,11 +1678,11 @@
EVCardAttribute *attr = NULL;
GladeXML *wtree = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
- g_return_val_if_fail (attr_name != NULL, retval);
+ g_return_val_if_fail (attr_name, retval);
wtree = soylent_browser_get_widget_tree (browser);
@@ -1738,7 +1738,7 @@
GladeXML *wtree = NULL;
EVCard *e_vcard = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -1857,8 +1857,8 @@
GladeXML *wtree = NULL;
SoylentBrowser *browser = NULL;
- g_return_val_if_fail (key != NULL, retval);
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (key, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -1895,8 +1895,8 @@
GtkWidget *widget = NULL;
EContact *e_contact = NULL;
- g_return_val_if_fail (key != NULL, retval);
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (key, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -1910,10 +1910,10 @@
e_contact = soylent_browser_get_selected_person_e_contact (browser);
- g_return_val_if_fail (widget != NULL, retval);
+ g_return_val_if_fail (widget, retval);
g_return_val_if_fail (GTK_IS_ENTRY (widget) || GTK_IS_TEXT_VIEW (widget),
retval);
- g_return_val_if_fail (e_contact != NULL, retval);
+ g_return_val_if_fail (e_contact, retval);
g_return_val_if_fail (E_IS_CONTACT (e_contact), retval);
if (GTK_IS_ENTRY (widget))
@@ -1982,8 +1982,8 @@
const gchar *context_str = NULL;
guint fieldnum = 0;
- g_return_val_if_fail (key != NULL, retval);
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (key, retval);
+ g_return_val_if_fail (user_data, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
@@ -2086,11 +2086,11 @@
gchar *context_str = NULL;
gchar *label_str = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (e_contact != NULL, retval);
+ g_return_val_if_fail (e_contact, retval);
g_return_val_if_fail (E_IS_CONTACT (e_contact), retval);
g_return_val_if_fail (widget_name, retval);
@@ -2150,7 +2150,7 @@
gboolean retval = FALSE;
GList *email_list_head = NULL;
- g_return_val_if_fail (e_contact != NULL, retval);
+ g_return_val_if_fail (e_contact, retval);
g_return_val_if_fail (E_IS_CONTACT (e_contact), retval);
g_return_val_if_fail (email_pos >= 0, retval);
g_return_val_if_fail (email_pos < MAX_GUI_EMAIL, retval);
@@ -2193,7 +2193,7 @@
{
gboolean retval = FALSE;
- g_return_val_if_fail (e_contact != NULL, retval);
+ g_return_val_if_fail (e_contact, retval);
g_return_val_if_fail (E_IS_CONTACT (e_contact), retval);
g_return_val_if_fail (e_contact_field >= E_CONTACT_FIELD_FIRST, retval);
g_return_val_if_fail (e_contact_field < E_CONTACT_FIELD_LAST, retval);
@@ -2233,11 +2233,11 @@
{
gboolean retval = FALSE;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (PERSON), retval);
*/
@@ -2272,7 +2272,7 @@
GtkEntry *entry_detail_add = NULL;
gint i = 0;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -2337,11 +2337,11 @@
GtkFrame *frame_email = NULL;
GtkFixed *fixed_email = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (PERSON), retval);
*/
@@ -2445,11 +2445,11 @@
const gchar *im_name = NULL;
EVCardAttribute *attr = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (PERSON), retval);
*/
@@ -2627,11 +2627,11 @@
EContactPhoto *photo = NULL;
GdkPixbuf *pixbuf = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (PERSON), retval);
*/
@@ -2690,11 +2690,11 @@
guint context = 0;
guint frames_visible = 0;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (PERSON), retval);
*/
@@ -2811,11 +2811,11 @@
GtkEntry *entry_name = NULL;
const gchar *name = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (PERSON), retval);
*/
@@ -2868,11 +2868,11 @@
guint num_entries_set = 0;
const gchar *phone_str = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (PERSON), retval);
*/
@@ -2955,11 +2955,11 @@
const gchar *web_name = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (PERSON), retval);
*/
@@ -3025,11 +3025,11 @@
GladeXML *wtree = NULL;
GtkComboBox *cbox = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (user_data), retval);
*/
- g_return_val_if_fail (cbox_name != NULL, retval);
+ g_return_val_if_fail (cbox_name, retval);
wtree = soylent_browser_get_widget_tree (browser);
cbox = GTK_COMBO_BOX (glade_xml_get_widget (wtree, cbox_name));
@@ -3057,7 +3057,7 @@
gchar *attr_val_menu = NULL;
guint i;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -3065,7 +3065,7 @@
wtree = soylent_browser_get_widget_tree (browser);
cbox = GTK_COMBO_BOX (glade_xml_get_widget (wtree, "cbox_detail_type_web"));
attr_val_menu = gtk_combo_box_get_active_text (cbox);
- for (i = 0; menu_strs[i] != NULL; i++)
+ for (i = 0; menu_strs[i]; i++)
{
if (g_str_equal (attr_val_menu, menu_strs[i]))
{
Modified: trunk/src/soylent-browser.c
==============================================================================
--- trunk/src/soylent-browser.c (original)
+++ trunk/src/soylent-browser.c Tue Apr 1 06:30:36 2008
@@ -251,7 +251,7 @@
EBook*
soylent_browser_get_e_book (SoylentBrowser *browser)
{
- g_return_val_if_fail (browser != NULL, NULL);
+ g_return_val_if_fail (browser, NULL);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), NULL);
*/
@@ -262,7 +262,7 @@
EBookView*
soylent_browser_get_e_book_view (SoylentBrowser *browser)
{
- g_return_val_if_fail (browser != NULL, NULL);
+ g_return_val_if_fail (browser, NULL);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), NULL);
*/
@@ -273,7 +273,7 @@
GHashTable*
soylent_browser_get_edits_pending (SoylentBrowser *browser)
{
- g_return_val_if_fail (browser != NULL, NULL);
+ g_return_val_if_fail (browser, NULL);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), NULL);
*/
@@ -284,7 +284,7 @@
guint
soylent_browser_get_icon_height_max (SoylentBrowser *browser)
{
- g_return_val_if_fail (browser != NULL, 0);
+ g_return_val_if_fail (browser, 0);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), 0);
*/
@@ -295,7 +295,7 @@
guint
soylent_browser_get_icon_width_max (SoylentBrowser *browser)
{
- g_return_val_if_fail (browser != NULL, 0);
+ g_return_val_if_fail (browser, 0);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), 0);
*/
@@ -306,7 +306,7 @@
EmpathyContactManager*
soylent_browser_get_live_manager (SoylentBrowser *browser)
{
- g_return_val_if_fail (browser != NULL, NULL);
+ g_return_val_if_fail (browser, NULL);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), NULL);
*/
@@ -317,7 +317,7 @@
GHashTable*
soylent_browser_get_people (SoylentBrowser *browser)
{
- g_return_val_if_fail (browser != NULL, NULL);
+ g_return_val_if_fail (browser, NULL);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), NULL);
*/
@@ -328,7 +328,7 @@
GladeXML*
soylent_browser_get_widget_tree (SoylentBrowser *browser)
{
- g_return_val_if_fail (browser != NULL, NULL);
+ g_return_val_if_fail (browser, NULL);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), NULL);
*/
@@ -349,13 +349,13 @@
GladeXML *wtree = NULL;
gchar *widget_str = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (type_widget != NULL, retval);
- g_return_val_if_fail (type_data != NULL, retval);
- g_return_val_if_fail (context != NULL, retval);
+ g_return_val_if_fail (type_widget, retval);
+ g_return_val_if_fail (type_data, retval);
+ g_return_val_if_fail (context, retval);
wtree = browser->main_window;
@@ -391,11 +391,11 @@
{
SoylentPerson *retval = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (e_uid != NULL, retval);
+ g_return_val_if_fail (e_uid, retval);
retval = g_hash_table_lookup (browser->people, e_uid);
if (!retval)
@@ -414,11 +414,11 @@
SoylentPerson *retval = NULL;
const gchar *e_uid = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (e_contact != NULL, retval);
+ g_return_val_if_fail (e_contact, retval);
g_return_val_if_fail (E_IS_CONTACT (e_contact), retval);
e_uid = e_contact_get_const (e_contact, E_CONTACT_UID);
@@ -444,7 +444,7 @@
GList *l = NULL;
guint i = -1;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -453,7 +453,7 @@
/* TODO: use gtk_icon_view_selected_foreach () */
- for (i = 0, l = selected_people_e_uids; l != NULL; l = g_list_next (l))
+ for (i = 0, l = selected_people_e_uids; l; l = g_list_next (l))
{
gchar *e_uid = NULL;
@@ -494,7 +494,7 @@
GList *l = NULL;
guint i = -1;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -503,7 +503,7 @@
/* TODO: use gtk_icon_view_selected_foreach () */
- for (i = 0, l = selected_people_e_uids; l != NULL; l = g_list_next (l))
+ for (i = 0, l = selected_people_e_uids; l; l = g_list_next (l))
{
gchar *e_uid = NULL;
@@ -552,7 +552,7 @@
GList *l = NULL;
guint i = 0;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -561,7 +561,7 @@
icon_view = GTK_ICON_VIEW (glade_xml_get_widget (wtree, "iv_people"));
selected_people = gtk_icon_view_get_selected_items (icon_view);
/* TODO: use gtk_icon_view_selected_foreach () */
- for (i = 0, l = selected_people; l != NULL; l = g_list_next (l))
+ for (i = 0, l = selected_people; l; l = g_list_next (l))
{
GtkTreePath *path = NULL;
GtkTreeModel *model = NULL;
@@ -588,7 +588,7 @@
gchar *e_uid = NULL;
SoylentPerson *retval = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -620,7 +620,7 @@
EContact *retval = NULL;
SoylentPerson *person = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -647,7 +647,7 @@
GtkIconView *icon_view = NULL;
GList *selected_people = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -700,11 +700,11 @@
SoylentPerson *retval = NULL;
const gchar *live_name = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (empathy_contact != NULL, retval);
+ g_return_val_if_fail (empathy_contact, retval);
g_return_val_if_fail (EMPATHY_IS_CONTACT (empathy_contact), retval);
live_name = empathy_contact_get_id (empathy_contact);
@@ -818,9 +818,9 @@
gboolean retval = FALSE;
SoylentBrowser *browser = NULL;
- g_return_val_if_fail (widget != NULL, retval);
+ g_return_val_if_fail (widget, retval);
g_return_val_if_fail (GTK_IS_COMBO_BOX (widget), retval);
- g_return_val_if_fail (user_data != NULL, retval);
+ g_return_val_if_fail (user_data, retval);
browser = (SoylentBrowser*) user_data;
/* TODO: also check that the browser is a SoylentBrowser GObject, once
@@ -879,11 +879,11 @@
{
gboolean retval = FALSE;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (people != NULL, retval);
+ g_return_val_if_fail (people, retval);
browser->people = people;
retval = TRUE;
@@ -897,11 +897,11 @@
{
gboolean retval = FALSE;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (e_book != NULL, retval);
+ g_return_val_if_fail (e_book, retval);
g_return_val_if_fail (E_IS_BOOK (e_book), retval);
browser->book = e_book;
@@ -917,11 +917,11 @@
{
gboolean retval = FALSE;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (e_book_view != NULL, retval);
+ g_return_val_if_fail (e_book_view, retval);
g_return_val_if_fail (E_IS_BOOK_VIEW (e_book_view), retval);
browser->book_view = e_book_view;
@@ -938,7 +938,7 @@
{
gboolean retval = FALSE;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -1028,7 +1028,7 @@
GtkWidget *hs_detail_new = NULL;
GtkWidget *btn_detail_add = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -1088,11 +1088,11 @@
GtkIconView *iv_people = NULL;
GtkTreeModel *model = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), retval);
*/
@@ -1147,11 +1147,11 @@
GtkIconView *icon_view = NULL;
GtkListStore *model = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), retval);
*/
@@ -1443,11 +1443,11 @@
{
gboolean retval = FALSE;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (empathy_contact != NULL, retval);
+ g_return_val_if_fail (empathy_contact, retval);
g_return_val_if_fail (EMPATHY_IS_CONTACT (empathy_contact), retval);
/* FIXME: once SoylentPerson is a GObject, check SOYLENT_IS_PERSON */
@@ -1477,11 +1477,11 @@
{
gboolean retval = FALSE;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
- g_return_val_if_fail (empathy_contact != NULL, retval);
+ g_return_val_if_fail (empathy_contact, retval);
g_return_val_if_fail (EMPATHY_IS_CONTACT (empathy_contact), retval);
/* FIXME: once SoylentPerson is a GObject, check SOYLENT_IS_PERSON */
@@ -1511,7 +1511,7 @@
GladeXML *wtree = NULL;
GtkListStore *list_store = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -1759,7 +1759,7 @@
guint signals_num = -1;
guint i = -1;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
@@ -1863,7 +1863,7 @@
guint i = 0;
guint j = 0;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
*/
Modified: trunk/src/soylent-person.c
==============================================================================
--- trunk/src/soylent-person.c (original)
+++ trunk/src/soylent-person.c Tue Apr 1 06:30:36 2008
@@ -52,11 +52,11 @@
{
SoylentPerson *retval = NULL;
- g_return_val_if_fail (browser != NULL, retval);
+ g_return_val_if_fail (browser, retval);
/* FIXME: uncomment once SoylentBrowser is a GObject:
g_return_val_if_fail (SOYLENT_IS_BROWSER (browser), retval);
* */
- g_return_val_if_fail (e_contact != NULL, retval);
+ g_return_val_if_fail (e_contact, retval);
g_return_val_if_fail (E_IS_CONTACT (e_contact), retval);
retval = g_new (SoylentPerson, 1);
@@ -90,7 +90,7 @@
EContact*
soylent_person_get_e_contact (SoylentPerson *person)
{
- g_return_val_if_fail (person != NULL, NULL);
+ g_return_val_if_fail (person, NULL);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), NULL);
* */
@@ -101,7 +101,7 @@
GList*
soylent_person_get_live_contacts (SoylentPerson *person)
{
- g_return_val_if_fail (person != NULL, NULL);
+ g_return_val_if_fail (person, NULL);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), NULL);
* */
@@ -112,7 +112,7 @@
SoylentPresence
soylent_person_get_presence (SoylentPerson *person)
{
- g_return_val_if_fail (person != NULL, SP_PRESENCE_UNSET);
+ g_return_val_if_fail (person, SP_PRESENCE_UNSET);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), NULL);
* */
@@ -123,7 +123,7 @@
GtkTreeIter*
soylent_person_get_icon_view_iter (SoylentPerson *person)
{
- g_return_val_if_fail (person != NULL, NULL);
+ g_return_val_if_fail (person, NULL);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), NULL);
* */
@@ -134,7 +134,7 @@
SoylentBrowser*
soylent_person_get_browser (SoylentPerson *person)
{
- g_return_val_if_fail (person != NULL, NULL);
+ g_return_val_if_fail (person, NULL);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), NULL);
* */
@@ -156,7 +156,7 @@
GdkPixbuf *retval = NULL;
EContact *e_contact = NULL;
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), retval);
*/
@@ -224,7 +224,7 @@
gchar *retval = NULL;
EContact *e_contact = NULL;
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), NULL);
*/
@@ -274,11 +274,11 @@
{
gboolean retval = FALSE;
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), NULL);
* */
- g_return_val_if_fail (e_contact != NULL, retval);
+ g_return_val_if_fail (e_contact, retval);
g_return_val_if_fail (E_IS_CONTACT (e_contact), retval);
if (person->e_contact)
@@ -301,11 +301,11 @@
{
gboolean retval = FALSE;
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), retval);
* */
- g_return_val_if_fail (live_contacts != NULL, retval);
+ g_return_val_if_fail (live_contacts, retval);
person->live_contacts = live_contacts;
@@ -324,11 +324,11 @@
GList *live_contact_existing = NULL;
gboolean update_presence_retval = FALSE;
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), retval);
* */
- g_return_val_if_fail (empathy_contact != NULL, retval);
+ g_return_val_if_fail (empathy_contact, retval);
g_return_val_if_fail (EMPATHY_IS_CONTACT (empathy_contact), retval);
/* Only add the contact if they aren't already among our live contacts */
@@ -362,11 +362,11 @@
gboolean retval = FALSE;
gboolean update_presence_retval = FALSE;
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), retval);
* */
- g_return_val_if_fail (empathy_contact != NULL, retval);
+ g_return_val_if_fail (empathy_contact, retval);
g_return_val_if_fail (EMPATHY_IS_CONTACT (empathy_contact), retval);
person->live_contacts = g_list_remove_all (person->live_contacts,
@@ -459,9 +459,9 @@
SoylentPresence soylent_person_presence_effective = SP_PRESENCE_OFFLINE;
GList *l = NULL;
- g_return_val_if_fail (empathy_contact != NULL, retval);
+ g_return_val_if_fail (empathy_contact, retval);
g_return_val_if_fail (EMPATHY_IS_CONTACT (empathy_contact), retval);
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), retval);
*/
@@ -520,7 +520,7 @@
gboolean retval = FALSE;
SoylentBrowser *browser = NULL;
- g_return_val_if_fail (person != NULL, retval);
+ g_return_val_if_fail (person, retval);
/* FIXME: uncomment once SoylentPerson is a GObject:
g_return_val_if_fail (SOYLENT_IS_PERSON (person), retval);
* */
Modified: trunk/src/soylent-utils.c
==============================================================================
--- trunk/src/soylent-utils.c (original)
+++ trunk/src/soylent-utils.c Tue Apr 1 06:30:36 2008
@@ -38,11 +38,11 @@
gboolean retval = FALSE;
GtkWidget *widget = NULL;
- g_return_val_if_fail (wtree != NULL, retval);
+ g_return_val_if_fail (wtree, retval);
g_return_val_if_fail (GLADE_IS_XML (wtree), retval);
- g_return_val_if_fail (widget_name != NULL, retval);
- g_return_val_if_fail (signal != NULL, retval);
- g_return_val_if_fail (callback != NULL, retval);
+ g_return_val_if_fail (widget_name, retval);
+ g_return_val_if_fail (signal, retval);
+ g_return_val_if_fail (callback, retval);
widget = glade_xml_get_widget (wtree, widget_name);
if (widget && GTK_IS_WIDGET (widget))
@@ -115,7 +115,7 @@
gchar *retval = NULL;
gchar **name_split = NULL;
- g_return_val_if_fail (full_name != NULL, retval);
+ g_return_val_if_fail (full_name, retval);
g_return_val_if_fail (!g_str_equal (full_name, ""), retval);
name_split = g_strsplit (full_name, " ", -1);
@@ -135,7 +135,7 @@
gchar **name_split = NULL;
guint names_num = 0;
- g_return_val_if_fail (full_name != NULL, retval);
+ g_return_val_if_fail (full_name, retval);
g_return_val_if_fail (!g_str_equal (full_name, ""), retval);
name_split = g_strsplit (full_name, " ", -1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]