[evolution-data-server] Remove some redundant argument checks.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Remove some redundant argument checks.
- Date: Wed, 18 Apr 2012 17:41:15 +0000 (UTC)
commit 95631d02f57a6379c3c062d3f0c4f20dc50c0c23
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Apr 18 11:54:13 2012 -0400
Remove some redundant argument checks.
addressbook/libebook/e-book-client-view.c | 4 -
addressbook/libebook/e-book-client.c | 93 +-------------
addressbook/libedata-book/e-book-backend.c | 2 -
addressbook/libegdbus/e-gdbus-book.c | 6 -
calendar/backends/caldav/e-cal-backend-caldav.c | 13 +--
calendar/backends/file/e-cal-backend-file.c | 11 +--
calendar/backends/http/e-cal-backend-http.c | 3 +-
calendar/backends/weather/e-cal-backend-weather.c | 1 -
calendar/libecal/e-cal-client-view.c | 5 -
calendar/libecal/e-cal-client.c | 135 +--------------------
calendar/libedata-cal/e-cal-backend.c | 2 -
calendar/libegdbus/e-gdbus-cal.c | 6 -
camel/camel-certdb.c | 4 -
camel/camel-store-summary.c | 21 ++--
libedataserver/e-client.c | 97 +---------------
libedataserver/e-proxy.c | 11 +--
libedataserverui/e-name-selector.c | 4 -
17 files changed, 28 insertions(+), 390 deletions(-)
---
diff --git a/addressbook/libebook/e-book-client-view.c b/addressbook/libebook/e-book-client-view.c
index b4e7d34..dc271f1 100644
--- a/addressbook/libebook/e-book-client-view.c
+++ b/addressbook/libebook/e-book-client-view.c
@@ -219,7 +219,6 @@ e_book_client_view_start (EBookClientView *view,
{
EBookClientViewPrivate *priv;
- g_return_if_fail (view != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT_VIEW (view));
priv = view->priv;
@@ -251,7 +250,6 @@ e_book_client_view_stop (EBookClientView *view,
{
EBookClientViewPrivate *priv;
- g_return_if_fail (view != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT_VIEW (view));
priv = view->priv;
@@ -286,7 +284,6 @@ e_book_client_view_set_flags (EBookClientView *view,
{
EBookClientViewPrivate *priv;
- g_return_if_fail (view != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT_VIEW (view));
priv = view->priv;
@@ -327,7 +324,6 @@ e_book_client_view_set_fields_of_interest (EBookClientView *view,
{
EBookClientViewPrivate *priv;
- g_return_if_fail (view != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT_VIEW (view));
priv = view->priv;
diff --git a/addressbook/libebook/e-book-client.c b/addressbook/libebook/e-book-client.c
index 329ad53..2d1a67d 100644
--- a/addressbook/libebook/e-book-client.c
+++ b/addressbook/libebook/e-book-client.c
@@ -341,9 +341,7 @@ gdbus_book_client_connection_gone_cb (GDBusConnection *connection,
static void
gdbus_book_client_disconnect (EBookClient *client)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
/* Ensure that everything relevant is NULL */
LOCK_FACTORY ();
@@ -368,7 +366,6 @@ backend_error_cb (EGdbusBook *object,
const gchar *message,
EBookClient *client)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT (client));
g_return_if_fail (message != NULL);
@@ -380,7 +377,6 @@ readonly_cb (EGdbusBook *object,
gboolean readonly,
EBookClient *client)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT (client));
e_client_set_readonly (E_CLIENT (client), readonly);
@@ -391,7 +387,6 @@ online_cb (EGdbusBook *object,
gboolean is_online,
EBookClient *client)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT (client));
e_client_set_online (E_CLIENT (client), is_online);
@@ -404,7 +399,6 @@ auth_required_cb (EGdbusBook *object,
{
ECredentials *credentials;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT (client));
if (credentials_strv)
@@ -424,7 +418,6 @@ opened_cb (EGdbusBook *object,
{
GError *error = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT (client));
g_return_if_fail (error_strv != NULL);
g_return_if_fail (e_gdbus_templates_decode_error (error_strv, &error));
@@ -442,7 +435,6 @@ backend_property_changed_cb (EGdbusBook *object,
{
gchar *prop_name = NULL, *prop_value = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_BOOK_CLIENT (client));
g_return_if_fail (name_value_strv != NULL);
g_return_if_fail (e_gdbus_templates_decode_two_strings (name_value_strv, &prop_name, &prop_value));
@@ -730,9 +722,7 @@ e_book_client_set_default (EBookClient *client,
{
ESource *source;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
source = e_client_get_source (E_CLIENT (client));
g_return_val_if_fail (source != NULL, FALSE);
@@ -867,7 +857,7 @@ e_book_client_get_self (EContact **contact,
gchar *uid;
g_return_val_if_fail (contact != NULL, FALSE);
- g_return_val_if_fail (client != NULL, FALSE);
+ g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
*client = e_book_client_new_system (&local_error);
if (!*client) {
@@ -938,7 +928,7 @@ e_book_client_set_self (EBookClient *client,
{
GConfClient *gconf;
- g_return_val_if_fail (client != NULL, FALSE);
+ g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
g_return_val_if_fail (contact != NULL, FALSE);
g_return_val_if_fail (e_contact_get_const (contact, E_CONTACT_UID) != NULL, FALSE);
@@ -988,7 +978,6 @@ book_client_get_backend_property_from_cache_finish (EClient *client,
GSimpleAsyncResult *simple;
GError *local_error = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
g_return_val_if_fail (result != NULL, FALSE);
g_return_val_if_fail (prop_value != NULL, FALSE);
@@ -1064,12 +1053,9 @@ book_client_get_backend_property_sync (EClient *client,
gchar *prop_val;
gboolean res;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
book_client = E_BOOK_CLIENT (client);
- g_return_val_if_fail (book_client != NULL, FALSE);
- g_return_val_if_fail (book_client->priv != NULL, FALSE);
if (!book_client->priv->gdbus_book) {
set_proxy_gone_error (error);
@@ -1131,12 +1117,9 @@ book_client_set_backend_property_sync (EClient *client,
gboolean res;
gchar **prop_name_value;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
book_client = E_BOOK_CLIENT (client);
- g_return_val_if_fail (book_client != NULL, FALSE);
- g_return_val_if_fail (book_client->priv != NULL, FALSE);
if (!book_client->priv->gdbus_book) {
set_proxy_gone_error (error);
@@ -1178,12 +1161,9 @@ book_client_open_sync (EClient *client,
{
EBookClient *book_client;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
book_client = E_BOOK_CLIENT (client);
- g_return_val_if_fail (book_client != NULL, FALSE);
- g_return_val_if_fail (book_client->priv != NULL, FALSE);
if (!book_client->priv->gdbus_book) {
set_proxy_gone_error (error);
@@ -1219,12 +1199,9 @@ book_client_remove_sync (EClient *client,
{
EBookClient *book_client;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
book_client = E_BOOK_CLIENT (client);
- g_return_val_if_fail (book_client != NULL, FALSE);
- g_return_val_if_fail (book_client->priv != NULL, FALSE);
if (!book_client->priv->gdbus_book) {
set_proxy_gone_error (error);
@@ -1260,12 +1237,9 @@ book_client_refresh_sync (EClient *client,
{
EBookClient *book_client;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
book_client = E_BOOK_CLIENT (client);
- g_return_val_if_fail (book_client != NULL, FALSE);
- g_return_val_if_fail (book_client->priv != NULL, FALSE);
if (!book_client->priv->gdbus_book) {
set_proxy_gone_error (error);
@@ -1385,9 +1359,7 @@ e_book_client_add_contact_sync (EBookClient *client,
gchar *vcard, *gdbus_vcard = NULL, **out_uids = NULL;
const gchar *strv[2];
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
if (!client->priv->gdbus_book) {
set_proxy_gone_error (error);
@@ -1525,9 +1497,7 @@ e_book_client_add_contacts_sync (EBookClient *client,
gboolean res;
gchar **array, **out_uids = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
if (!client->priv->gdbus_book) {
set_proxy_gone_error (error);
@@ -1635,9 +1605,7 @@ e_book_client_modify_contact_sync (EBookClient *client,
gchar *vcard, *gdbus_vcard = NULL;
const gchar *strv[2];
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
if (!client->priv->gdbus_book) {
set_proxy_gone_error (error);
@@ -1734,9 +1702,7 @@ e_book_client_modify_contacts_sync (EBookClient *client,
gboolean res;
gchar **array;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (contacts != NULL, FALSE);
if (!client->priv->gdbus_book) {
@@ -1841,10 +1807,7 @@ e_book_client_remove_contact_sync (EBookClient *client,
const gchar *uid, *safe_uid;
gchar *gdbus_uid = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
- g_return_val_if_fail (contact != NULL, FALSE);
g_return_val_if_fail (E_IS_CONTACT (contact), FALSE);
if (!client->priv->gdbus_book) {
@@ -1952,9 +1915,7 @@ e_book_client_remove_contact_by_uid_sync (EBookClient *client,
gchar *gdbus_uid = NULL;
const gchar *strv[2];
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
if (!client->priv->gdbus_book) {
@@ -2058,9 +2019,7 @@ e_book_client_remove_contacts_sync (EBookClient *client,
gboolean res;
gchar **strv;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (uids != NULL, FALSE);
if (!client->priv->gdbus_book) {
@@ -2179,9 +2138,7 @@ e_book_client_get_contact_sync (EBookClient *client,
const gchar *safe_uid;
gchar *vcard = NULL, *gdbus_uid = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (contact != NULL, FALSE);
@@ -2317,9 +2274,7 @@ e_book_client_get_contacts_sync (EBookClient *client,
gchar *gdbus_sexp = NULL;
gchar **vcards = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (contacts != NULL, FALSE);
@@ -2460,9 +2415,7 @@ e_book_client_get_contacts_uids_sync (EBookClient *client,
gchar *gdbus_sexp = NULL;
gchar **uids = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (contacts_uids != NULL, FALSE);
@@ -2631,9 +2584,7 @@ e_book_client_get_view_sync (EBookClient *client,
gchar *gdbus_sexp = NULL;
gchar *view_path = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (view != NULL, FALSE);
@@ -2654,11 +2605,9 @@ book_client_get_dbus_proxy (EClient *client)
{
EBookClient *book_client;
- g_return_val_if_fail (client != NULL, NULL);
+ g_return_val_if_fail (E_IS_CLIENT (client), NULL);
book_client = E_BOOK_CLIENT (client);
- g_return_val_if_fail (book_client != NULL, NULL);
- g_return_val_if_fail (book_client->priv != NULL, NULL);
return book_client->priv->gdbus_book;
}
@@ -2679,12 +2628,10 @@ book_client_handle_authentication (EClient *client,
GError *error = NULL;
gchar **strv;
- g_return_if_fail (client != NULL);
+ g_return_if_fail (E_IS_BOOK_CLIENT (client));
g_return_if_fail (credentials != NULL);
book_client = E_BOOK_CLIENT (client);
- g_return_if_fail (book_client != NULL);
- g_return_if_fail (book_client->priv != NULL);
if (!book_client->priv->gdbus_book)
return;
@@ -2708,13 +2655,7 @@ book_client_retrieve_capabilities (EClient *client,
GAsyncReadyCallback callback,
gpointer user_data)
{
- EBookClient *book_client;
-
- g_return_if_fail (client != NULL);
-
- book_client = E_BOOK_CLIENT (client);
- g_return_if_fail (book_client != NULL);
- g_return_if_fail (book_client->priv != NULL);
+ g_return_if_fail (E_IS_BOOK_CLIENT (client));
book_client_get_backend_property (client, CLIENT_BACKEND_PROPERTY_CAPABILITIES, cancellable, callback, user_data);
}
@@ -2725,13 +2666,7 @@ book_client_retrieve_capabilities_finish (EClient *client,
gchar **capabilities,
GError **error)
{
- EBookClient *book_client;
-
- g_return_val_if_fail (client != NULL, FALSE);
-
- book_client = E_BOOK_CLIENT (client);
- g_return_val_if_fail (book_client != NULL, FALSE);
- g_return_val_if_fail (book_client->priv != NULL, FALSE);
+ g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
return book_client_get_backend_property_finish (client, result, capabilities, error);
}
@@ -2742,13 +2677,7 @@ book_client_retrieve_capabilities_sync (EClient *client,
GCancellable *cancellable,
GError **error)
{
- EBookClient *book_client;
-
- g_return_val_if_fail (client != NULL, FALSE);
-
- book_client = E_BOOK_CLIENT (client);
- g_return_val_if_fail (book_client != NULL, FALSE);
- g_return_val_if_fail (book_client->priv != NULL, FALSE);
+ g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
return book_client_get_backend_property_sync (client, CLIENT_BACKEND_PROPERTY_CAPABILITIES, capabilities, cancellable, error);
}
@@ -2769,8 +2698,6 @@ book_client_dispose (GObject *object)
EClient *client;
client = E_CLIENT (object);
- g_return_if_fail (client != NULL);
- g_return_if_fail (client->priv != NULL);
e_client_cancel_all (client);
@@ -2783,12 +2710,6 @@ book_client_dispose (GObject *object)
static void
book_client_finalize (GObject *object)
{
- EBookClient *client;
-
- client = E_BOOK_CLIENT (object);
- g_return_if_fail (client != NULL);
- g_return_if_fail (client->priv != NULL);
-
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (e_book_client_parent_class)->finalize (object);
diff --git a/addressbook/libedata-book/e-book-backend.c b/addressbook/libedata-book/e-book-backend.c
index 22c886a..e3a5712 100644
--- a/addressbook/libedata-book/e-book-backend.c
+++ b/addressbook/libedata-book/e-book-backend.c
@@ -1263,9 +1263,7 @@ e_book_backend_notify_property_changed (EBookBackend *backend,
EBookBackendPrivate *priv;
GSList *clients;
- g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_BOOK_BACKEND (backend));
- g_return_if_fail (backend->priv != NULL);
g_return_if_fail (prop_name != NULL);
g_return_if_fail (*prop_name != '\0');
g_return_if_fail (prop_value != NULL);
diff --git a/addressbook/libegdbus/e-gdbus-book.c b/addressbook/libegdbus/e-gdbus-book.c
index c7431fe..367e4a1 100644
--- a/addressbook/libegdbus/e-gdbus-book.c
+++ b/addressbook/libegdbus/e-gdbus-book.c
@@ -1076,9 +1076,6 @@ gdbus_book_proxy_finalize (GObject *object)
{
EGdbusBookProxy *proxy = E_GDBUS_BOOK_PROXY (object);
- g_return_if_fail (proxy != NULL);
- g_return_if_fail (proxy->priv != NULL);
-
if (g_hash_table_size (proxy->priv->pending_ops))
g_debug ("%s: Kept %d items in pending_ops", G_STRFUNC, g_hash_table_size (proxy->priv->pending_ops));
@@ -1112,12 +1109,9 @@ gdbus_book_get_pending_ops (EGdbusAsyncOpKeeper *object)
{
EGdbusBookProxy *proxy;
- g_return_val_if_fail (object != NULL, NULL);
g_return_val_if_fail (E_IS_GDBUS_BOOK_PROXY (object), NULL);
proxy = E_GDBUS_BOOK_PROXY (object);
- g_return_val_if_fail (proxy != NULL, NULL);
- g_return_val_if_fail (proxy->priv != NULL, NULL);
return proxy->priv->pending_ops;
}
diff --git a/calendar/backends/caldav/e-cal-backend-caldav.c b/calendar/backends/caldav/e-cal-backend-caldav.c
index a141ffe..cc7ebaf 100644
--- a/calendar/backends/caldav/e-cal-backend-caldav.c
+++ b/calendar/backends/caldav/e-cal-backend-caldav.c
@@ -1116,8 +1116,7 @@ caldav_notify_auth_required (ECalBackendCalDAV *cbdav)
guint prompt_flags;
gchar *prompt_flags_str;
- g_return_if_fail (cbdav != NULL);
- g_return_if_fail (cbdav->priv != NULL);
+ g_return_if_fail (E_IS_CAL_BACKEND_CALDAV (cbdav));
cbdav->priv->opened = FALSE;
update_slave_cmd (cbdav->priv, SLAVE_SHOULD_SLEEP);
@@ -1385,8 +1384,7 @@ caldav_server_download_attachment (ECalBackendCalDAV *cbdav,
{
SoupMessage *message;
- g_return_val_if_fail (cbdav != NULL, FALSE);
- g_return_val_if_fail (cbdav->priv != NULL, FALSE);
+ g_return_val_if_fail (E_IS_CAL_BACKEND_CALDAV (cbdav), FALSE);
g_return_val_if_fail (attachment_uri != NULL, FALSE);
g_return_val_if_fail (content != NULL, FALSE);
g_return_val_if_fail (len != NULL, FALSE);
@@ -1753,9 +1751,7 @@ caldav_receive_schedule_outbox_url (ECalBackendCalDAV *cbdav)
xmlNsPtr nsdav;
gchar *owner = NULL;
- g_return_val_if_fail (cbdav != NULL, FALSE);
-
- g_return_val_if_fail (cbdav->priv != NULL, FALSE);
+ g_return_val_if_fail (E_IS_CAL_BACKEND_CALDAV (cbdav), FALSE);
g_return_val_if_fail (cbdav->priv->schedule_outbox_url == NULL, TRUE);
/* Prepare the soup message */
@@ -3047,8 +3043,7 @@ is_stored_on_server (ECalBackendCalDAV *cbdav,
SoupURI *my_uri, *test_uri;
gboolean res;
- g_return_val_if_fail (cbdav != NULL, FALSE);
- g_return_val_if_fail (cbdav->priv != NULL, FALSE);
+ g_return_val_if_fail (E_IS_CAL_BACKEND_CALDAV (cbdav), FALSE);
g_return_val_if_fail (cbdav->priv->uri != NULL, FALSE);
g_return_val_if_fail (uri != NULL, FALSE);
diff --git a/calendar/backends/file/e-cal-backend-file.c b/calendar/backends/file/e-cal-backend-file.c
index b63aea9..48b7212 100644
--- a/calendar/backends/file/e-cal-backend-file.c
+++ b/calendar/backends/file/e-cal-backend-file.c
@@ -1041,10 +1041,9 @@ free_refresh_data (ECalBackendFile *cbfile)
{
ECalBackendFilePrivate *priv;
- g_return_if_fail (cbfile != NULL);
+ g_return_if_fail (E_IS_CAL_BACKEND_FILE (cbfile));
priv = cbfile->priv;
- g_return_if_fail (priv != NULL);
g_mutex_lock (priv->refresh_lock);
@@ -1664,21 +1663,13 @@ match_object_sexp_to_component (gpointer value,
ECalComponent * comp = value;
MatchObjectData *match_data = data;
const gchar *uid;
- ECalBackendFile *cbfile;
- ECalBackendFilePrivate *priv;
e_cal_component_get_uid (comp, &uid);
g_return_if_fail (comp != NULL);
- cbfile = E_CAL_BACKEND_FILE (match_data->backend);
-
g_return_if_fail (match_data->backend != NULL);
- priv = cbfile->priv;
-
- g_return_if_fail (priv != NULL);
-
if ((!match_data->search_needed) ||
(e_cal_backend_sexp_match_comp (match_data->obj_sexp, comp, match_data->backend))) {
if (match_data->as_string)
diff --git a/calendar/backends/http/e-cal-backend-http.c b/calendar/backends/http/e-cal-backend-http.c
index 66a7e15..ff7e2b1 100644
--- a/calendar/backends/http/e-cal-backend-http.c
+++ b/calendar/backends/http/e-cal-backend-http.c
@@ -702,8 +702,7 @@ source_changed_cb (ESource *source,
{
ECalBackendHttpPrivate *priv;
- g_return_if_fail (cbhttp != NULL);
- g_return_if_fail (cbhttp->priv != NULL);
+ g_return_if_fail (E_IS_CAL_BACKEND_HTTP (cbhttp));
priv = cbhttp->priv;
diff --git a/calendar/backends/weather/e-cal-backend-weather.c b/calendar/backends/weather/e-cal-backend-weather.c
index cd562fd..cc875b2 100644
--- a/calendar/backends/weather/e-cal-backend-weather.c
+++ b/calendar/backends/weather/e-cal-backend-weather.c
@@ -812,7 +812,6 @@ e_cal_backend_weather_internal_get_timezone (ECalBackend *backend,
ECalBackendWeather *cbw = E_CAL_BACKEND_WEATHER (backend);
g_return_val_if_fail (E_IS_CAL_BACKEND_WEATHER (cbw), NULL);
- g_return_val_if_fail (cbw->priv != NULL, NULL);
zone = g_hash_table_lookup (cbw->priv->zones, tzid);
diff --git a/calendar/libecal/e-cal-client-view.c b/calendar/libecal/e-cal-client-view.c
index e16baa7..645762d 100644
--- a/calendar/libecal/e-cal-client-view.c
+++ b/calendar/libecal/e-cal-client-view.c
@@ -295,7 +295,6 @@ cal_client_view_finalize (GObject *object)
ECalClientView *view;
ECalClientViewPrivate *priv;
- g_return_if_fail (object != NULL);
g_return_if_fail (E_IS_CAL_CLIENT_VIEW (object));
view = E_CAL_CLIENT_VIEW (object);
@@ -478,7 +477,6 @@ e_cal_client_view_start (ECalClientView *view,
{
ECalClientViewPrivate *priv;
- g_return_if_fail (view != NULL);
g_return_if_fail (E_IS_CAL_CLIENT_VIEW (view));
priv = view->priv;
@@ -512,7 +510,6 @@ e_cal_client_view_stop (ECalClientView *view,
{
ECalClientViewPrivate *priv;
- g_return_if_fail (view != NULL);
g_return_if_fail (E_IS_CAL_CLIENT_VIEW (view));
priv = view->priv;
@@ -554,7 +551,6 @@ e_cal_client_view_set_fields_of_interest (ECalClientView *view,
{
ECalClientViewPrivate *priv;
- g_return_if_fail (view != NULL);
g_return_if_fail (E_IS_CAL_CLIENT_VIEW (view));
priv = view->priv;
@@ -591,7 +587,6 @@ e_cal_client_view_set_flags (ECalClientView *view,
{
ECalClientViewPrivate *priv;
- g_return_if_fail (view != NULL);
g_return_if_fail (E_IS_CAL_CLIENT_VIEW (view));
priv = view->priv;
diff --git a/calendar/libecal/e-cal-client.c b/calendar/libecal/e-cal-client.c
index 6685e07..bb8151f 100644
--- a/calendar/libecal/e-cal-client.c
+++ b/calendar/libecal/e-cal-client.c
@@ -387,9 +387,7 @@ gdbus_cal_client_connection_gone_cb (GDBusConnection *connection,
static void
gdbus_cal_client_disconnect (ECalClient *client)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
/* Ensure that everything relevant is NULL */
LOCK_FACTORY ();
@@ -414,7 +412,6 @@ backend_error_cb (EGdbusCal *object,
const gchar *message,
ECalClient *client)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
g_return_if_fail (message != NULL);
@@ -426,7 +423,6 @@ readonly_cb (EGdbusCal *object,
gboolean readonly,
ECalClient *client)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
e_client_set_readonly (E_CLIENT (client), readonly);
@@ -437,7 +433,6 @@ online_cb (EGdbusCal *object,
gboolean is_online,
ECalClient *client)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
e_client_set_online (E_CLIENT (client), is_online);
@@ -450,7 +445,6 @@ auth_required_cb (EGdbusCal *object,
{
ECredentials *credentials;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
if (credentials_strv)
@@ -470,7 +464,6 @@ opened_cb (EGdbusCal *object,
{
GError *error = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
g_return_if_fail (error_strv != NULL);
g_return_if_fail (e_gdbus_templates_decode_error (error_strv, &error));
@@ -489,7 +482,6 @@ free_busy_data_cb (EGdbusCal *object,
GSList *ecalcomps = NULL;
gint ii;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
g_return_if_fail (free_busy_strv != NULL);
@@ -531,7 +523,6 @@ backend_property_changed_cb (EGdbusCal *object,
{
gchar *prop_name = NULL, *prop_value = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
g_return_if_fail (name_value_strv != NULL);
g_return_if_fail (e_gdbus_templates_decode_two_strings (name_value_strv, &prop_name, &prop_value));
@@ -624,7 +615,6 @@ e_cal_client_new (ESource *source,
gchar *xml, **strv;
gchar *path = NULL;
- g_return_val_if_fail (source != NULL, NULL);
g_return_val_if_fail (E_IS_SOURCE (source), NULL);
g_return_val_if_fail (source_type == E_CAL_CLIENT_SOURCE_TYPE_EVENTS || source_type == E_CAL_CLIENT_SOURCE_TYPE_TASKS || source_type == E_CAL_CLIENT_SOURCE_TYPE_MEMOS, NULL);
@@ -872,9 +862,7 @@ e_cal_client_set_default (ECalClient *client,
{
ESource *source;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
source = e_client_get_source (E_CLIENT (client));
g_return_val_if_fail (source != NULL, FALSE);
@@ -903,7 +891,6 @@ e_cal_client_set_default_source (ESource *source,
ESourceList *source_list = NULL;
gboolean res = FALSE;
- g_return_val_if_fail (source != NULL, FALSE);
g_return_val_if_fail (E_IS_SOURCE (source), FALSE);
if (!e_cal_client_get_sources (&source_list, source_type, error))
@@ -983,9 +970,7 @@ e_cal_client_get_sources (ESourceList **sources,
ECalClientSourceType
e_cal_client_get_source_type (ECalClient *client)
{
- g_return_val_if_fail (client != NULL, E_CAL_CLIENT_SOURCE_TYPE_LAST);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), E_CAL_CLIENT_SOURCE_TYPE_LAST);
- g_return_val_if_fail (client->priv != NULL, E_CAL_CLIENT_SOURCE_TYPE_LAST);
return client->priv->source_type;
}
@@ -1011,9 +996,7 @@ e_cal_client_get_local_attachment_store (ECalClient *client)
gchar *cache_dir = NULL;
GError *error = NULL;
- g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), NULL);
- g_return_val_if_fail (client->priv != NULL, NULL);
if (client->priv->cache_dir || !client->priv->gdbus_cal)
return client->priv->cache_dir;
@@ -1074,9 +1057,7 @@ copy_timezone (icaltimezone *ozone)
void
e_cal_client_set_default_timezone (ECalClient *client, /* const */ icaltimezone *zone)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (zone != NULL);
if (client->priv->default_zone != icaltimezone_get_utc_timezone ())
@@ -1100,9 +1081,7 @@ e_cal_client_set_default_timezone (ECalClient *client, /* const */ icaltimezone
/* const */ icaltimezone *
e_cal_client_get_default_timezone (ECalClient *client)
{
- g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), NULL);
- g_return_val_if_fail (client->priv != NULL, NULL);
return client->priv->default_zone;
}
@@ -1120,7 +1099,6 @@ e_cal_client_get_default_timezone (ECalClient *client)
gboolean
e_cal_client_check_one_alarm_only (ECalClient *client)
{
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
return e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_ONE_ALARM_ONLY);
@@ -1139,7 +1117,6 @@ e_cal_client_check_one_alarm_only (ECalClient *client)
gboolean
e_cal_client_check_save_schedules (ECalClient *client)
{
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
return e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_SAVE_SCHEDULES);
@@ -1159,7 +1136,6 @@ e_cal_client_check_save_schedules (ECalClient *client)
gboolean
e_cal_client_check_organizer_must_attend (ECalClient *client)
{
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
return e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ATTEND);
@@ -1180,7 +1156,6 @@ e_cal_client_check_organizer_must_attend (ECalClient *client)
gboolean
e_cal_client_check_organizer_must_accept (ECalClient *client)
{
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
return e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_ORGANIZER_MUST_ACCEPT);
@@ -1200,7 +1175,6 @@ e_cal_client_check_organizer_must_accept (ECalClient *client)
gboolean
e_cal_client_check_recurrences_no_master (ECalClient *client)
{
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
return e_client_check_capability (E_CLIENT (client), CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER);
@@ -1258,7 +1232,6 @@ e_cal_client_resolve_tzid_cb (const gchar *tzid,
icaltimezone *zone = NULL;
GError *error = NULL;
- g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), NULL);
e_cal_client_get_timezone_sync (client, tzid, &zone, NULL, &error);
@@ -1930,7 +1903,6 @@ e_cal_client_generate_instances (ECalClient *client,
struct get_objects_async_data *goad;
GCancellable *use_cancellable;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
g_return_if_fail (e_client_is_opened (E_CLIENT (client)));
@@ -1983,7 +1955,6 @@ e_cal_client_generate_instances_sync (ECalClient *client,
{
GSList *objects = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
g_return_if_fail (e_client_is_opened (E_CLIENT (client)));
@@ -2111,7 +2082,6 @@ e_cal_client_generate_instances_for_object (ECalClient *client,
struct get_objects_async_data *goad;
GCancellable *use_cancellable;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
g_return_if_fail (e_client_is_opened (E_CLIENT (client)));
@@ -2214,7 +2184,6 @@ e_cal_client_generate_instances_for_object_sync (ECalClient *client,
struct instances_info *instances_hold;
gboolean is_single_instance = FALSE;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
g_return_if_fail (e_client_is_opened (E_CLIENT (client)));
@@ -2358,9 +2327,7 @@ e_cal_client_get_component_as_string (ECalClient *client,
ForeachTZIDCallbackData cbdata;
gchar *obj_string;
- g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), NULL);
- g_return_val_if_fail (client->priv != NULL, NULL);
g_return_val_if_fail (icalcomp != NULL, NULL);
timezone_hash = g_hash_table_new (g_str_hash, g_str_equal);
@@ -2414,7 +2381,6 @@ cal_client_get_backend_property_from_cache_finish (EClient *client,
GSimpleAsyncResult *simple;
GError *local_error = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (result != NULL, FALSE);
g_return_val_if_fail (prop_value != NULL, FALSE);
@@ -2490,12 +2456,9 @@ cal_client_get_backend_property_sync (EClient *client,
gchar *prop_val;
gboolean res;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
cal_client = E_CAL_CLIENT (client);
- g_return_val_if_fail (cal_client != NULL, FALSE);
- g_return_val_if_fail (cal_client->priv != NULL, FALSE);
if (!cal_client->priv->gdbus_cal) {
set_proxy_gone_error (error);
@@ -2557,12 +2520,9 @@ cal_client_set_backend_property_sync (EClient *client,
gboolean res;
gchar **prop_name_value;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
cal_client = E_CAL_CLIENT (client);
- g_return_val_if_fail (cal_client != NULL, FALSE);
- g_return_val_if_fail (cal_client->priv != NULL, FALSE);
if (!cal_client->priv->gdbus_cal) {
set_proxy_gone_error (error);
@@ -2604,12 +2564,9 @@ cal_client_open_sync (EClient *client,
{
ECalClient *cal_client;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
cal_client = E_CAL_CLIENT (client);
- g_return_val_if_fail (cal_client != NULL, FALSE);
- g_return_val_if_fail (cal_client->priv != NULL, FALSE);
if (!cal_client->priv->gdbus_cal) {
set_proxy_gone_error (error);
@@ -2645,12 +2602,9 @@ cal_client_remove_sync (EClient *client,
{
ECalClient *cal_client;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
cal_client = E_CAL_CLIENT (client);
- g_return_val_if_fail (cal_client != NULL, FALSE);
- g_return_val_if_fail (cal_client->priv != NULL, FALSE);
if (!cal_client->priv->gdbus_cal) {
set_proxy_gone_error (error);
@@ -2686,12 +2640,9 @@ cal_client_refresh_sync (EClient *client,
{
ECalClient *cal_client;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
cal_client = E_CAL_CLIENT (client);
- g_return_val_if_fail (cal_client != NULL, FALSE);
- g_return_val_if_fail (cal_client->priv != NULL, FALSE);
if (!cal_client->priv->gdbus_cal) {
set_proxy_gone_error (error);
@@ -2761,7 +2712,6 @@ cal_client_get_default_object_from_cache_finish (EClient *client,
GSimpleAsyncResult *simple;
GError *local_error = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (result != NULL, FALSE);
g_return_val_if_fail (prop_value != NULL, FALSE);
@@ -2902,9 +2852,7 @@ e_cal_client_get_default_object_sync (ECalClient *client,
gboolean res;
gchar *out_string = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (icalcomp != NULL, FALSE);
if (!client->priv->gdbus_cal) {
@@ -3101,9 +3049,7 @@ e_cal_client_get_object_sync (ECalClient *client,
gboolean res;
gchar *out_string = NULL, **strv;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (icalcomp != NULL, FALSE);
@@ -3270,9 +3216,7 @@ e_cal_client_get_objects_for_uid_sync (ECalClient *client,
gboolean res;
gchar *out_string = NULL, **strv = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (ecalcomps != NULL, FALSE);
@@ -3412,9 +3356,7 @@ e_cal_client_get_object_list_sync (ECalClient *client,
gboolean res;
gchar **out_strv = NULL, *gdbus_sexp = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (icalcomps != NULL, FALSE);
@@ -3558,9 +3500,7 @@ e_cal_client_get_object_list_as_comps_sync (ECalClient *client,
gboolean res;
gchar **out_strv = NULL, *gdbus_sexp = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (ecalcomps != NULL, FALSE);
@@ -3664,9 +3604,7 @@ e_cal_client_get_free_busy_sync (ECalClient *client,
gboolean res;
gchar **strv;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
if (!client->priv->gdbus_cal) {
set_proxy_gone_error (error);
@@ -3790,9 +3728,7 @@ e_cal_client_create_object_sync (ECalClient *client,
gchar **out_strings = NULL;
gchar *out_string = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (icalcomp != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
@@ -3845,9 +3781,7 @@ e_cal_client_create_objects (ECalClient *client,
{
gchar **array;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (icalcomps != NULL);
array = icalcomponent_slist_to_utf8_icomp_array (icalcomps);
@@ -3883,9 +3817,7 @@ e_cal_client_create_objects_finish (ECalClient *client,
gboolean res;
gchar **out_strings = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (uids != NULL, FALSE);
res = e_client_proxy_call_finish_strv (E_CLIENT (client), result, &out_strings, error, e_cal_client_create_objects);
@@ -3921,9 +3853,7 @@ e_cal_client_create_objects_sync (ECalClient *client,
gboolean res;
gchar **array, **out_strings = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (icalcomps != NULL, FALSE);
g_return_val_if_fail (uids != NULL, FALSE);
@@ -4037,9 +3967,7 @@ e_cal_client_modify_object_sync (ECalClient *client,
gchar *comp_str, **strv;
GSList comp_strings = {0,};
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (icalcomp != NULL, FALSE);
if (!client->priv->gdbus_cal) {
@@ -4092,9 +4020,7 @@ e_cal_client_modify_objects (ECalClient *client,
GSList *comp_strings;
gchar **strv;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CAL_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (comps != NULL);
comp_strings = icalcomponent_slist_to_string_slist(comps);
@@ -4125,9 +4051,7 @@ e_cal_client_modify_objects_finish (ECalClient *client,
GAsyncResult *result,
GError **error)
{
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_cal_client_modify_objects);
}
@@ -4163,9 +4087,7 @@ e_cal_client_modify_objects_sync (ECalClient *client,
gchar **strv;
GSList *comp_strings;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (comps != NULL, FALSE);
if (!client->priv->gdbus_cal) {
@@ -4284,9 +4206,7 @@ e_cal_client_remove_object_sync (ECalClient *client,
GSList ids = {0,};
ECalComponentId id;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
if (!client->priv->gdbus_cal) {
@@ -4393,9 +4313,7 @@ e_cal_client_remove_objects_sync (ECalClient *client,
gboolean res;
gchar **strv;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (ids != NULL, FALSE);
if (!client->priv->gdbus_cal) {
@@ -4494,9 +4412,7 @@ e_cal_client_receive_objects_sync (ECalClient *client,
gboolean res;
gchar *comp_str, *gdbus_comp = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
if (!client->priv->gdbus_cal) {
set_proxy_gone_error (error);
@@ -4654,9 +4570,7 @@ e_cal_client_send_objects_sync (ECalClient *client,
gboolean res;
gchar **out_strv = NULL, *comp_str, *gdbus_comp = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (icalcomp != NULL, FALSE);
g_return_val_if_fail (users != NULL, FALSE);
g_return_val_if_fail (modified_icalcomp != NULL, FALSE);
@@ -4778,9 +4692,7 @@ e_cal_client_get_attachment_uris_sync (ECalClient *client,
gboolean res;
gchar **strv, **out_strv = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (attachment_uris != NULL, FALSE);
@@ -4891,9 +4803,7 @@ e_cal_client_discard_alarm_sync (ECalClient *client,
gboolean res;
gchar **strv;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (auid != NULL, FALSE);
@@ -5044,9 +4954,7 @@ e_cal_client_get_view_sync (ECalClient *client,
gchar *gdbus_sexp = NULL;
gchar *view_path = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (view != NULL, FALSE);
@@ -5068,9 +4976,7 @@ cal_client_get_timezone_from_cache (ECalClient *client,
{
icaltimezone *zone = NULL;
- g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), NULL);
- g_return_val_if_fail (client->priv != NULL, NULL);
g_return_val_if_fail (tzid != NULL, NULL);
g_return_val_if_fail (client->priv->zone_cache != NULL, NULL);
g_return_val_if_fail (client->priv->zone_cache_lock != NULL, NULL);
@@ -5149,7 +5055,6 @@ cal_client_get_timezone_from_cache_finish (ECalClient *client,
GSimpleAsyncResult *simple;
GError *local_error = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (result != NULL, FALSE);
g_return_val_if_fail (zone != NULL, FALSE);
@@ -5306,9 +5211,7 @@ e_cal_client_get_timezone_sync (ECalClient *client,
gboolean res;
gchar *gdbus_tzid = NULL, *out_string = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (tzid != NULL, FALSE);
g_return_val_if_fail (zone != NULL, FALSE);
@@ -5413,9 +5316,7 @@ e_cal_client_add_timezone_sync (ECalClient *client,
icalcomponent *icalcomp;
gchar *zone_str, *gdbus_zone = NULL;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (zone != NULL, FALSE);
if (zone == icaltimezone_get_utc_timezone ())
@@ -5447,11 +5348,9 @@ cal_client_get_dbus_proxy (EClient *client)
{
ECalClient *cal_client;
- g_return_val_if_fail (client != NULL, NULL);
+ g_return_val_if_fail (E_IS_CAL_CLIENT (client), NULL);
cal_client = E_CAL_CLIENT (client);
- g_return_val_if_fail (cal_client != NULL, NULL);
- g_return_val_if_fail (cal_client->priv != NULL, NULL);
return cal_client->priv->gdbus_cal;
}
@@ -5472,12 +5371,10 @@ cal_client_handle_authentication (EClient *client,
GError *error = NULL;
gchar **strv;
- g_return_if_fail (client != NULL);
+ g_return_if_fail (E_IS_CAL_CLIENT (client));
g_return_if_fail (credentials != NULL);
cal_client = E_CAL_CLIENT (client);
- g_return_if_fail (cal_client != NULL);
- g_return_if_fail (cal_client->priv != NULL);
if (!cal_client->priv->gdbus_cal)
return;
@@ -5501,13 +5398,7 @@ cal_client_retrieve_capabilities (EClient *client,
GAsyncReadyCallback callback,
gpointer user_data)
{
- ECalClient *cal_client;
-
- g_return_if_fail (client != NULL);
-
- cal_client = E_CAL_CLIENT (client);
- g_return_if_fail (cal_client != NULL);
- g_return_if_fail (cal_client->priv != NULL);
+ g_return_if_fail (E_IS_CAL_CLIENT (client));
cal_client_get_backend_property (client, CLIENT_BACKEND_PROPERTY_CAPABILITIES, cancellable, callback, user_data);
}
@@ -5518,13 +5409,7 @@ cal_client_retrieve_capabilities_finish (EClient *client,
gchar **capabilities,
GError **error)
{
- ECalClient *cal_client;
-
- g_return_val_if_fail (client != NULL, FALSE);
-
- cal_client = E_CAL_CLIENT (client);
- g_return_val_if_fail (cal_client != NULL, FALSE);
- g_return_val_if_fail (cal_client->priv != NULL, FALSE);
+ g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
return cal_client_get_backend_property_finish (client, result, capabilities, error);
}
@@ -5535,13 +5420,7 @@ cal_client_retrieve_capabilities_sync (EClient *client,
GCancellable *cancellable,
GError **error)
{
- ECalClient *cal_client;
-
- g_return_val_if_fail (client != NULL, FALSE);
-
- cal_client = E_CAL_CLIENT (client);
- g_return_val_if_fail (cal_client != NULL, FALSE);
- g_return_val_if_fail (cal_client->priv != NULL, FALSE);
+ g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
return cal_client_get_backend_property_sync (client, CLIENT_BACKEND_PROPERTY_CAPABILITIES, capabilities, cancellable, error);
}
@@ -5573,8 +5452,6 @@ cal_client_dispose (GObject *object)
EClient *client;
client = E_CLIENT (object);
- g_return_if_fail (client != NULL);
- g_return_if_fail (client->priv != NULL);
e_client_cancel_all (client);
@@ -5591,8 +5468,6 @@ cal_client_finalize (GObject *object)
ECalClientPrivate *priv;
client = E_CAL_CLIENT (object);
- g_return_if_fail (client != NULL);
- g_return_if_fail (client->priv != NULL);
priv = client->priv;
diff --git a/calendar/libedata-cal/e-cal-backend.c b/calendar/libedata-cal/e-cal-backend.c
index 441ce4e..cc0db26 100644
--- a/calendar/libedata-cal/e-cal-backend.c
+++ b/calendar/libedata-cal/e-cal-backend.c
@@ -1978,9 +1978,7 @@ e_cal_backend_notify_property_changed (ECalBackend *backend,
ECalBackendPrivate *priv;
GSList *clients;
- g_return_if_fail (backend != NULL);
g_return_if_fail (E_IS_CAL_BACKEND (backend));
- g_return_if_fail (backend->priv != NULL);
g_return_if_fail (prop_name != NULL);
g_return_if_fail (*prop_name != '\0');
g_return_if_fail (prop_value != NULL);
diff --git a/calendar/libegdbus/e-gdbus-cal.c b/calendar/libegdbus/e-gdbus-cal.c
index c8edbd8..ca9e602 100644
--- a/calendar/libegdbus/e-gdbus-cal.c
+++ b/calendar/libegdbus/e-gdbus-cal.c
@@ -1626,9 +1626,6 @@ gdbus_cal_proxy_finalize (GObject *object)
{
EGdbusCalProxy *proxy = E_GDBUS_CAL_PROXY (object);
- g_return_if_fail (proxy != NULL);
- g_return_if_fail (proxy->priv != NULL);
-
if (g_hash_table_size (proxy->priv->pending_ops))
g_debug ("%s: Kept %d items in pending_ops", G_STRFUNC, g_hash_table_size (proxy->priv->pending_ops));
@@ -1662,12 +1659,9 @@ gdbus_cal_get_pending_ops (EGdbusAsyncOpKeeper *object)
{
EGdbusCalProxy *proxy;
- g_return_val_if_fail (object != NULL, NULL);
g_return_val_if_fail (E_IS_GDBUS_CAL_PROXY (object), NULL);
proxy = E_GDBUS_CAL_PROXY (object);
- g_return_val_if_fail (proxy != NULL, NULL);
- g_return_val_if_fail (proxy->priv != NULL, NULL);
return proxy->priv->pending_ops;
}
diff --git a/camel/camel-certdb.c b/camel/camel-certdb.c
index 214b0b6..f56696c 100644
--- a/camel/camel-certdb.c
+++ b/camel/camel-certdb.c
@@ -721,9 +721,7 @@ void
camel_certdb_lock (CamelCertDB *certdb,
CamelCertDBLock lock)
{
- g_return_if_fail (certdb != NULL);
g_return_if_fail (CAMEL_IS_CERTDB (certdb));
- g_return_if_fail (certdb->priv != NULL);
switch (lock) {
case CAMEL_CERTDB_DB_LOCK:
@@ -756,9 +754,7 @@ void
camel_certdb_unlock (CamelCertDB *certdb,
CamelCertDBLock lock)
{
- g_return_if_fail (certdb != NULL);
g_return_if_fail (CAMEL_IS_CERTDB (certdb));
- g_return_if_fail (certdb->priv != NULL);
switch (lock) {
case CAMEL_CERTDB_DB_LOCK:
diff --git a/camel/camel-store-summary.c b/camel/camel-store-summary.c
index 800c237..acaa0e7 100644
--- a/camel/camel-store-summary.c
+++ b/camel/camel-store-summary.c
@@ -1133,10 +1133,9 @@ camel_store_summary_unlock (CamelStoreSummary *summary,
static gboolean
store_summary_save_timeout (gpointer user_data)
{
- CamelStoreSummary *summary = user_data;
+ CamelStoreSummary *summary = CAMEL_STORE_SUMMARY (user_data);
g_return_val_if_fail (summary != NULL, FALSE);
- g_return_val_if_fail (summary->priv != NULL, FALSE);
camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_REF_LOCK);
camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
@@ -1155,8 +1154,7 @@ store_summary_save_timeout (gpointer user_data)
static void
store_summary_schedule_save (CamelStoreSummary *summary)
{
- g_return_if_fail (summary != NULL);
- g_return_if_fail (summary->priv != NULL);
+ g_return_if_fail (CAMEL_IS_STORE_SUMMARY (summary));
if (summary->priv->scheduled_save_id != 0)
g_source_remove (summary->priv->scheduled_save_id);
@@ -1173,10 +1171,9 @@ store_summary_sync_folder_summary_count_cb (CamelFolderSummary *folder_summary,
const gchar *path;
CamelStoreInfo *si;
- g_return_if_fail (folder_summary != NULL);
+ g_return_if_fail (CAMEL_IS_FOLDER_SUMMARY (folder_summary));
g_return_if_fail (param != NULL);
- g_return_if_fail (summary != NULL);
- g_return_if_fail (summary->priv != NULL);
+ g_return_if_fail (CAMEL_IS_STORE_SUMMARY (summary));
path = g_hash_table_lookup (summary->priv->folder_summaries, folder_summary);
g_return_if_fail (path != NULL);
@@ -1239,10 +1236,9 @@ camel_store_summary_connect_folder_summary (CamelStoreSummary *summary,
{
CamelStoreInfo *si;
- g_return_val_if_fail (summary != NULL, FALSE);
- g_return_val_if_fail (summary->priv != NULL, FALSE);
+ g_return_val_if_fail (CAMEL_IS_STORE_SUMMARY (summary), FALSE);
g_return_val_if_fail (path != NULL, FALSE);
- g_return_val_if_fail (folder_summary != NULL, FALSE);
+ g_return_val_if_fail (CAMEL_IS_FOLDER_SUMMARY (folder_summary), FALSE);
camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_REF_LOCK);
camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
@@ -1291,9 +1287,8 @@ gboolean
camel_store_summary_disconnect_folder_summary (CamelStoreSummary *summary,
CamelFolderSummary *folder_summary)
{
- g_return_val_if_fail (summary != NULL, FALSE);
- g_return_val_if_fail (summary->priv != NULL, FALSE);
- g_return_val_if_fail (folder_summary != NULL, FALSE);
+ g_return_val_if_fail (CAMEL_IS_STORE_SUMMARY (summary), FALSE);
+ g_return_val_if_fail (CAMEL_IS_FOLDER_SUMMARY (folder_summary), FALSE);
camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_REF_LOCK);
camel_store_summary_lock (summary, CAMEL_STORE_SUMMARY_SUMMARY_LOCK);
diff --git a/libedataserver/e-client.c b/libedataserver/e-client.c
index 74d7c02..278fbcd 100644
--- a/libedataserver/e-client.c
+++ b/libedataserver/e-client.c
@@ -211,8 +211,6 @@ client_dispose (GObject *object)
EClient *client;
client = E_CLIENT (object);
- g_return_if_fail (client != NULL);
- g_return_if_fail (client->priv != NULL);
e_client_cancel_all (client);
@@ -227,8 +225,6 @@ client_finalize (GObject *object)
EClientPrivate *priv;
client = E_CLIENT (object);
- g_return_if_fail (client != NULL);
- g_return_if_fail (client->priv != NULL);
priv = client->priv;
@@ -433,10 +429,7 @@ static void
client_set_source (EClient *client,
ESource *source)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
- g_return_if_fail (source != NULL);
g_return_if_fail (E_IS_SOURCE (source));
g_object_ref (source);
@@ -460,9 +453,7 @@ client_set_source (EClient *client,
ESource *
e_client_get_source (EClient *client)
{
- g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (E_IS_CLIENT (client), NULL);
- g_return_val_if_fail (client->priv != NULL, NULL);
return client->priv->source;
}
@@ -480,9 +471,7 @@ e_client_get_source (EClient *client)
const gchar *
e_client_get_uri (EClient *client)
{
- g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (E_IS_CLIENT (client), NULL);
- g_return_val_if_fail (client->priv != NULL, NULL);
if (!client->priv->uri)
client->priv->uri = e_source_get_uri (e_client_get_source (client));
@@ -495,9 +484,7 @@ client_ensure_capabilities (EClient *client)
{
gchar *capabilities;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
if (client->priv->capabilities_retrieved || client->priv->capabilities)
return;
@@ -530,9 +517,7 @@ client_ensure_capabilities (EClient *client)
const GSList *
e_client_get_capabilities (EClient *client)
{
- g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (E_IS_CLIENT (client), NULL);
- g_return_val_if_fail (client->priv != NULL, NULL);
client_ensure_capabilities (client);
@@ -557,9 +542,7 @@ e_client_check_capability (EClient *client,
{
GSList *iter;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (capability, FALSE);
g_static_rec_mutex_lock (&client->priv->prop_mutex);
@@ -594,7 +577,6 @@ e_client_check_capability (EClient *client,
gboolean
e_client_check_refresh_supported (EClient *client)
{
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
return e_client_check_capability (client, "refresh-supported");
@@ -605,9 +587,7 @@ void
e_client_set_capabilities (EClient *client,
const gchar *capabilities)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_static_rec_mutex_lock (&client->priv->prop_mutex);
@@ -636,9 +616,7 @@ e_client_set_capabilities (EClient *client,
gboolean
e_client_is_readonly (EClient *client)
{
- g_return_val_if_fail (client != NULL, TRUE);
g_return_val_if_fail (E_IS_CLIENT (client), TRUE);
- g_return_val_if_fail (client->priv != NULL, TRUE);
return client->priv->readonly;
}
@@ -647,9 +625,7 @@ void
e_client_set_readonly (EClient *client,
gboolean readonly)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_static_rec_mutex_lock (&client->priv->prop_mutex);
if ((readonly ? 1 : 0) == (client->priv->readonly ? 1 : 0)) {
@@ -677,9 +653,7 @@ e_client_set_readonly (EClient *client,
gboolean
e_client_is_online (EClient *client)
{
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
return client->priv->online;
}
@@ -688,9 +662,7 @@ void
e_client_set_online (EClient *client,
gboolean is_online)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
/* newly connected/disconnected => make sure capabilities will be correct */
e_client_set_capabilities (client, NULL);
@@ -725,9 +697,7 @@ e_client_set_online (EClient *client,
gboolean
e_client_is_opened (EClient *client)
{
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
return client->priv->opened;
}
@@ -749,9 +719,7 @@ client_cancel_op (EClient *client,
{
GCancellable *cancellable;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (client->priv->ops != NULL);
g_static_rec_mutex_lock (&client->priv->ops_mutex);
@@ -795,9 +763,7 @@ e_client_cancel_all (EClient *client)
{
GSList *opids = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (client->priv->ops != NULL);
g_static_rec_mutex_lock (&client->priv->ops_mutex);
@@ -816,9 +782,7 @@ e_client_register_op (EClient *client,
{
guint32 opid;
- g_return_val_if_fail (client != NULL, 0);
g_return_val_if_fail (E_IS_CLIENT (client), 0);
- g_return_val_if_fail (client->priv != NULL, 0);
g_return_val_if_fail (client->priv->ops != NULL, 0);
g_return_val_if_fail (cancellable != NULL, 0);
@@ -845,9 +809,7 @@ void
e_client_unregister_op (EClient *client,
guint32 opid)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (client->priv->ops != NULL);
g_static_rec_mutex_lock (&client->priv->ops_mutex);
@@ -861,7 +823,6 @@ client_handle_authentication (EClient *client,
{
EClientClass *class;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_return_if_fail (credentials != NULL);
@@ -934,7 +895,6 @@ e_client_process_authentication (EClient *client,
{
struct EClientAuthData *auth_data;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
auth_data = g_new0 (struct EClientAuthData, 1);
@@ -950,7 +910,6 @@ e_client_emit_authenticate (EClient *client,
{
gboolean handled = FALSE;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
g_return_val_if_fail (credentials != NULL, FALSE);
@@ -965,9 +924,7 @@ e_client_emit_opened (EClient *client,
{
GError *local_error = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
client->priv->opened = dbus_error == NULL;
@@ -987,7 +944,6 @@ void
e_client_emit_backend_error (EClient *client,
const gchar *error_msg)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_return_if_fail (error_msg != NULL);
@@ -997,7 +953,6 @@ e_client_emit_backend_error (EClient *client,
void
e_client_emit_backend_died (EClient *client)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_signal_emit (client, signals[BACKEND_DIED], 0);
@@ -1008,9 +963,7 @@ e_client_emit_backend_property_changed (EClient *client,
const gchar *prop_name,
const gchar *prop_value)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (prop_name != NULL);
g_return_if_fail (*prop_name);
g_return_if_fail (prop_value != NULL);
@@ -1025,9 +978,7 @@ e_client_update_backend_property_cache (EClient *client,
const gchar *prop_name,
const gchar *prop_value)
{
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (prop_name != NULL);
g_return_if_fail (*prop_name);
g_return_if_fail (prop_value != NULL);
@@ -1046,9 +997,7 @@ e_client_get_backend_property_from_cache (EClient *client,
{
gchar *prop_value = NULL;
- g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (E_IS_CLIENT (client), NULL);
- g_return_val_if_fail (client->priv != NULL, NULL);
g_return_val_if_fail (prop_name != NULL, NULL);
g_return_val_if_fail (*prop_name, NULL);
@@ -1086,9 +1035,7 @@ e_client_retrieve_capabilities (EClient *client,
{
EClientClass *class;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (callback != NULL);
class = E_CLIENT_GET_CLASS (client);
@@ -1122,9 +1069,7 @@ e_client_retrieve_capabilities_finish (EClient *client,
EClientClass *class;
gboolean res;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (capabilities != NULL, FALSE);
class = E_CLIENT_GET_CLASS (client);
@@ -1165,7 +1110,7 @@ e_client_retrieve_capabilities_sync (EClient *client,
EClientClass *class;
gboolean res = FALSE;
- g_return_val_if_fail (client != NULL, FALSE);
+ g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
g_return_val_if_fail (capabilities != NULL, FALSE);
class = E_CLIENT_GET_CLASS (client);
@@ -1204,9 +1149,7 @@ e_client_get_backend_property (EClient *client,
EClientClass *class;
g_return_if_fail (callback != NULL);
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (prop_name != NULL);
class = E_CLIENT_GET_CLASS (client);
@@ -1237,9 +1180,7 @@ e_client_get_backend_property_finish (EClient *client,
{
EClientClass *class;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (prop_value != NULL, FALSE);
class = E_CLIENT_GET_CLASS (client);
@@ -1272,9 +1213,7 @@ e_client_get_backend_property_sync (EClient *client,
{
EClientClass *class;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (prop_name != NULL, FALSE);
g_return_val_if_fail (prop_value != NULL, FALSE);
@@ -1311,9 +1250,7 @@ e_client_set_backend_property (EClient *client,
EClientClass *class;
g_return_if_fail (callback != NULL);
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (prop_name != NULL);
g_return_if_fail (prop_value != NULL);
@@ -1343,9 +1280,7 @@ e_client_set_backend_property_finish (EClient *client,
{
EClientClass *class;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
class = E_CLIENT_GET_CLASS (client);
g_return_val_if_fail (class != NULL, FALSE);
@@ -1378,9 +1313,7 @@ e_client_set_backend_property_sync (EClient *client,
{
EClientClass *class;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
g_return_val_if_fail (prop_name != NULL, FALSE);
g_return_val_if_fail (prop_value != NULL, FALSE);
@@ -1414,9 +1347,7 @@ e_client_open (EClient *client,
EClientClass *class;
g_return_if_fail (callback != NULL);
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
class = E_CLIENT_GET_CLASS (client);
g_return_if_fail (class != NULL);
@@ -1444,9 +1375,7 @@ e_client_open_finish (EClient *client,
{
EClientClass *class;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
class = E_CLIENT_GET_CLASS (client);
g_return_val_if_fail (class != NULL, FALSE);
@@ -1504,9 +1433,7 @@ e_client_remove (EClient *client,
{
EClientClass *class;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (callback != NULL);
class = E_CLIENT_GET_CLASS (client);
@@ -1535,9 +1462,7 @@ e_client_remove_finish (EClient *client,
{
EClientClass *class;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
class = E_CLIENT_GET_CLASS (client);
g_return_val_if_fail (class != NULL, FALSE);
@@ -1596,9 +1521,7 @@ e_client_refresh (EClient *client,
{
EClientClass *class;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
- g_return_if_fail (client->priv != NULL);
g_return_if_fail (callback != NULL);
class = E_CLIENT_GET_CLASS (client);
@@ -1627,9 +1550,7 @@ e_client_refresh_finish (EClient *client,
{
EClientClass *class;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
- g_return_val_if_fail (client->priv != NULL, FALSE);
class = E_CLIENT_GET_CLASS (client);
g_return_val_if_fail (class != NULL, FALSE);
@@ -2008,7 +1929,6 @@ e_client_finish_async_without_dbus (EClient *client,
GSimpleAsyncResult *simple;
guint32 opid;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_return_if_fail (callback != NULL);
g_return_if_fail (source_tag != NULL);
@@ -2034,7 +1954,6 @@ e_client_get_dbus_proxy (EClient *client)
{
EClientClass *class;
- g_return_val_if_fail (client != NULL, NULL);
g_return_val_if_fail (E_IS_CLIENT (client), NULL);
class = E_CLIENT_GET_CLASS (client);
@@ -2062,7 +1981,6 @@ e_client_unwrap_dbus_error (EClient *client,
{
EClientClass *class;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
class = E_CLIENT_GET_CLASS (client);
@@ -2404,7 +2322,6 @@ e_client_proxy_return_async_error (EClient *client,
{
EClientAsyncOpData *async_data;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_return_if_fail (error != NULL);
g_return_if_fail (callback != NULL);
@@ -2434,7 +2351,6 @@ e_client_proxy_call_void (EClient *client,
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_return_if_fail (callback != NULL);
g_return_if_fail (source_tag != NULL);
@@ -2467,7 +2383,6 @@ e_client_proxy_call_boolean (EClient *client,
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_return_if_fail (callback != NULL);
g_return_if_fail (source_tag != NULL);
@@ -2500,7 +2415,6 @@ e_client_proxy_call_string (EClient *client,
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_return_if_fail (callback != NULL);
g_return_if_fail (source_tag != NULL);
@@ -2535,7 +2449,6 @@ e_client_proxy_call_string_with_res_op_data (EClient *client,
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_return_if_fail (callback != NULL);
g_return_if_fail (source_tag != NULL);
@@ -2571,7 +2484,6 @@ e_client_proxy_call_strv (EClient *client,
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_return_if_fail (callback != NULL);
g_return_if_fail (source_tag != NULL);
@@ -2605,7 +2517,6 @@ e_client_proxy_call_uint (EClient *client,
EClientAsyncOpData *async_data;
GDBusProxy *proxy = NULL;
- g_return_if_fail (client != NULL);
g_return_if_fail (E_IS_CLIENT (client));
g_return_if_fail (callback != NULL);
g_return_if_fail (source_tag != NULL);
@@ -2627,7 +2538,6 @@ e_client_proxy_call_finish_void (EClient *client,
GError *local_error = NULL;
EClientAsyncOpData *async_data;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
g_return_val_if_fail (result != NULL, FALSE);
g_return_val_if_fail (source_tag != NULL, FALSE);
@@ -2657,7 +2567,6 @@ e_client_proxy_call_finish_boolean (EClient *client,
GError *local_error = NULL;
EClientAsyncOpData *async_data;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
g_return_val_if_fail (result != NULL, FALSE);
g_return_val_if_fail (source_tag != NULL, FALSE);
@@ -2690,7 +2599,6 @@ e_client_proxy_call_finish_string (EClient *client,
GError *local_error = NULL;
EClientAsyncOpData *async_data;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
g_return_val_if_fail (result != NULL, FALSE);
g_return_val_if_fail (source_tag != NULL, FALSE);
@@ -2724,7 +2632,6 @@ e_client_proxy_call_finish_strv (EClient *client,
GError *local_error = NULL;
EClientAsyncOpData *async_data;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
g_return_val_if_fail (result != NULL, FALSE);
g_return_val_if_fail (source_tag != NULL, FALSE);
@@ -2758,7 +2665,6 @@ e_client_proxy_call_finish_uint (EClient *client,
GError *local_error = NULL;
EClientAsyncOpData *async_data;
- g_return_val_if_fail (client != NULL, FALSE);
g_return_val_if_fail (E_IS_CLIENT (client), FALSE);
g_return_val_if_fail (result != NULL, FALSE);
g_return_val_if_fail (source_tag != NULL, FALSE);
@@ -2787,7 +2693,6 @@ e_client_proxy_call_finish_uint (EClient *client,
gboolean result; \
GError *local_error = NULL; \
\
- g_return_val_if_fail (client != NULL, FALSE); \
g_return_val_if_fail (E_IS_CLIENT (client), FALSE); \
g_return_val_if_fail (func != NULL, FALSE); \
g_return_val_if_fail (_out_test != NULL, FALSE); \
diff --git a/libedataserver/e-proxy.c b/libedataserver/e-proxy.c
index c997048..b949790 100644
--- a/libedataserver/e-proxy.c
+++ b/libedataserver/e-proxy.c
@@ -136,9 +136,7 @@ ep_read_key_boolean (EProxy *proxy,
{
gboolean res = FALSE;
- g_return_val_if_fail (proxy != NULL, FALSE);
g_return_val_if_fail (E_IS_PROXY (proxy), FALSE);
- g_return_val_if_fail (proxy->priv != NULL, FALSE);
switch (key) {
case E_PROXY_KEY_USE_HTTP_PROXY:
@@ -168,9 +166,7 @@ ep_read_key_int (EProxy *proxy,
{
gint res = 0;
- g_return_val_if_fail (proxy != NULL, 0);
g_return_val_if_fail (E_IS_PROXY (proxy), 0);
- g_return_val_if_fail (proxy->priv != NULL, 0);
switch (key) {
case E_PROXY_KEY_HTTP_PORT:
@@ -206,9 +202,7 @@ ep_read_key_string (EProxy *proxy,
{
gchar *res = NULL;
- g_return_val_if_fail (proxy != NULL, NULL);
g_return_val_if_fail (E_IS_PROXY (proxy), NULL);
- g_return_val_if_fail (proxy->priv != NULL, NULL);
switch (key) {
case E_PROXY_KEY_MODE:
@@ -269,9 +263,7 @@ ep_read_key_list (EProxy *proxy,
GSList *res = NULL;
gchar **strv = NULL;
- g_return_val_if_fail (proxy != NULL, NULL);
g_return_val_if_fail (E_IS_PROXY (proxy), NULL);
- g_return_val_if_fail (proxy->priv != NULL, NULL);
switch (key) {
case E_PROXY_KEY_HTTP_IGNORE_HOSTS:
@@ -807,8 +799,7 @@ ep_evo_proxy_changed_cb (GSettings *settings,
{
EProxyPrivate *priv;
- g_return_if_fail (proxy != NULL);
- g_return_if_fail (proxy->priv != NULL);
+ g_return_if_fail (E_IS_PROXY (proxy));
priv = proxy->priv;
diff --git a/libedataserverui/e-name-selector.c b/libedataserverui/e-name-selector.c
index 2cf3c70..82280e3 100644
--- a/libedataserverui/e-name-selector.c
+++ b/libedataserverui/e-name-selector.c
@@ -157,9 +157,7 @@ e_name_selector_load_books (ENameSelector *name_selector)
GSList *groups;
GSList *iter1;
- g_return_if_fail (name_selector != NULL);
g_return_if_fail (E_IS_NAME_SELECTOR (name_selector));
- g_return_if_fail (name_selector->priv != NULL);
g_return_if_fail (!name_selector->priv->books_loaded);
name_selector->priv->books_loaded = TRUE;
@@ -221,9 +219,7 @@ e_name_selector_load_books (ENameSelector *name_selector)
void
e_name_selector_cancel_loading (ENameSelector *name_selector)
{
- g_return_if_fail (name_selector != NULL);
g_return_if_fail (E_IS_NAME_SELECTOR (name_selector));
- g_return_if_fail (name_selector->priv != NULL);
g_return_if_fail (name_selector->priv->cancellable != NULL);
g_cancellable_cancel (name_selector->priv->cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]