[evolution-exchange] Coding style cleanups.



commit c81e197cfda8fae55fd3bde711fe158f2af4ed6e
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun May 8 14:02:43 2011 -0400

    Coding style cleanups.

 addressbook/e-book-backend-db-cache.c         |    2 +-
 addressbook/e-book-backend-exchange.c         |   34 +++++++++++-----------
 addressbook/e-book-backend-gal.c              |   32 +++++++++++-----------
 addressbook/e-book-backend-gal.h              |    4 +-
 calendar/e-cal-backend-exchange-calendar.c    |    6 ++--
 calendar/e-cal-backend-exchange-tasks.c       |   12 ++++----
 calendar/e-cal-backend-exchange.c             |   18 ++++++------
 calendar/e2k-cal-query.c                      |    8 +++---
 camel/camel-exchange-folder.c                 |   24 ++++++++--------
 camel/camel-exchange-journal.c                |    2 +-
 camel/camel-exchange-provider.c               |    2 +-
 camel/camel-exchange-summary.c                |   18 ++++++------
 camel/camel-exchange-transport.c              |    2 +-
 camel/camel-exchange-utils.c                  |   36 ++++++++++++------------
 eplugin/exchange-account-setup.c              |   36 ++++++++++++------------
 eplugin/exchange-calendar.c                   |    4 +-
 eplugin/exchange-contacts.c                   |    2 +-
 eplugin/exchange-delegates-user.c             |    2 +-
 eplugin/exchange-delegates.c                  |    8 +++---
 eplugin/exchange-folder-size-display.c        |    4 +-
 eplugin/exchange-folder.c                     |    2 +-
 eplugin/exchange-mail-send-options.c          |    2 +-
 eplugin/exchange-operations.c                 |    4 +-
 eplugin/exchange-send-options.c               |   16 +++++-----
 server/lib/e2k-autoconfig.c                   |    2 +-
 server/lib/e2k-context.c                      |    8 +++---
 server/lib/e2k-freebusy.c                     |    2 +-
 server/lib/e2k-global-catalog.c               |   10 +++---
 server/lib/e2k-http-utils.c                   |    4 +-
 server/lib/e2k-kerberos.c                     |    2 +-
 server/lib/e2k-properties.c                   |    6 ++--
 server/lib/e2k-restriction.c                  |    4 +-
 server/lib/e2k-result.c                       |    2 +-
 server/lib/e2k-rule-xml.c                     |    4 +-
 server/lib/e2k-rule.c                         |    2 +-
 server/lib/e2k-security-descriptor.c          |   16 +++++-----
 server/lib/e2k-sid.c                          |    8 +++---
 server/lib/e2k-uri.c                          |    4 +-
 server/lib/e2k-utils.c                        |    6 ++--
 server/lib/ebrowse.c                          |   12 ++++----
 server/storage/e-folder-exchange.c            |    4 +-
 server/storage/exchange-account.c             |   20 +++++++-------
 server/storage/exchange-hierarchy-favorites.c |    4 +-
 server/storage/exchange-hierarchy-foreign.c   |    4 +-
 server/storage/exchange-hierarchy-somedav.c   |    2 +-
 server/storage/exchange-hierarchy-webdav.c    |   10 +++---
 server/xntlm/xntlm-des.c                      |   32 +++++++++++-----------
 server/xntlm/xntlm.c                          |    2 +-
 tools/exchange-autoconfig-wizard.c            |    4 +-
 tools/ximian-connector-setup.c                |    2 +-
 50 files changed, 228 insertions(+), 228 deletions(-)
---
diff --git a/addressbook/e-book-backend-db-cache.c b/addressbook/e-book-backend-db-cache.c
index 1d60994..9402150 100644
--- a/addressbook/e-book-backend-db-cache.c
+++ b/addressbook/e-book-backend-db-cache.c
@@ -33,7 +33,7 @@ void
 string_to_dbt (const gchar *str, DBT *dbt)
 {
 	memset (dbt, 0, sizeof (dbt));
-	dbt->data = (gpointer)str;
+	dbt->data = (gpointer) str;
 	dbt->size = strlen (str) + 1;
 	dbt->flags = DB_DBT_USERMEM;
 }
diff --git a/addressbook/e-book-backend-exchange.c b/addressbook/e-book-backend-exchange.c
index 09682dd..0ea4078 100644
--- a/addressbook/e-book-backend-exchange.c
+++ b/addressbook/e-book-backend-exchange.c
@@ -374,7 +374,7 @@ get_contact_list_members (E2kContext *ctx, const gchar *list_href)
 
 			m = g_new0 (struct ContactListMember, 1);
 
-			m->memberID = g_strdup ((const gchar *)memid->children->content);
+			m->memberID = g_strdup ((const gchar *) memid->children->content);
 			m->email = g_strdup ((const gchar *) (email->children->content));
 			m->name = (dn && dn->children && dn->children->content) ? g_strdup ((const gchar *) dn->children->content) : NULL;
 
@@ -409,7 +409,7 @@ free_members_list (GSList *list)
 	if (!list)
 		return;
 
-	g_slist_foreach (list, (GFunc)free_contact_list_member, NULL);
+	g_slist_foreach (list, (GFunc) free_contact_list_member, NULL);
 	g_slist_free (list);
 }
 
@@ -532,7 +532,7 @@ e_contact_from_props (EBookBackendExchange *be, E2kResult *result)
 
 	content = camel_medium_get_content (CAMEL_MEDIUM (msg));
 	if (CAMEL_IS_MULTIPART (content)) {
-		multipart = (CamelMultipart *)content;
+		multipart = (CamelMultipart *) content;
 		content = NULL;
 
 		for (i = 0; i < camel_multipart_get_number (multipart); i++) {
@@ -982,7 +982,7 @@ populate_categories (EContactField field, EContact *new_contact, gpointer data)
 
 	for (i = 0; i < categories_list->len; i++) {
 		updated_list = g_list_append (updated_list,
-					      (gchar *)categories_list->pdata[i]);
+					      (gchar *) categories_list->pdata[i]);
 	}
 
 	e_contact_set (new_contact, E_CONTACT_CATEGORY_LIST, updated_list);
@@ -1035,7 +1035,7 @@ proppatch_date (PropMapping *prop_mapping,
 static void
 populate_date (EContactField field, EContact *new_contact, gpointer data)
 {
-	gchar *date = (gchar *)data;
+	gchar *date = (gchar *) data;
 	time_t tt;
 	struct tm *then;
 	EContactDate dt;
@@ -1200,7 +1200,7 @@ populate_im (EContactField field, EContact *new_contact, gpointer data)
 		e_vcard_attribute_add_param_with_value (attr,
 				e_vcard_attribute_param_new (EVC_TYPE), "WORK");
 
-		e_vcard_attribute_add_value (attr, (const gchar *)data);
+		e_vcard_attribute_add_value (attr, (const gchar *) data);
 
 		im_attr_list = g_list_append (im_attr_list, attr);
 	}
@@ -1214,7 +1214,7 @@ populate_address (EContactField field, EContact *new_contact, gpointer data)
 	EAddressWestern *waddr;
 	EContactAddress addr;
 
-	waddr = e_address_western_parse ((const gchar *)data);
+	waddr = e_address_western_parse ((const gchar *) data);
 	addr.address_format = (gchar *) "us"; /* FIXME? */
 	addr.po = waddr->po_box;
 	addr.ext = waddr->extended;
@@ -1654,10 +1654,10 @@ merge_contact_lists (EBookBackendExchange *be, const gchar *location, EContact *
 	/* remove all the members from the server which left - they has been removed during editing probably */
 	rm.be = be;
 	rm.list_href = location;
-	g_hash_table_foreach (sh, (GHFunc)remove_member, &rm);
+	g_hash_table_foreach (sh, (GHFunc) remove_member, &rm);
 
 	g_hash_table_destroy (sh);
-	g_list_foreach (local, (GFunc)e_vcard_attribute_free, NULL);
+	g_list_foreach (local, (GFunc) e_vcard_attribute_free, NULL);
 	g_list_free (local);
 	free_members_list (server);
 
@@ -1956,7 +1956,7 @@ func_not (ESExp *f, gint argc, ESExpResult **argv, gpointer data)
 
 	r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
 	r->value.string = (gchar *)
-		e2k_restriction_not ((E2kRestriction *)argv[0]->value.string, TRUE);
+		e2k_restriction_not ((E2kRestriction *) argv[0]->value.string, TRUE);
 
 	return r;
 }
@@ -1987,13 +1987,13 @@ func_and_or (ESExp *f, gint argc, ESExpResult **argv, gpointer and)
 	}
 
 	if (and)
-		rn = e2k_restriction_and (rns->len, (E2kRestriction **)rns->pdata, TRUE);
+		rn = e2k_restriction_and (rns->len, (E2kRestriction **) rns->pdata, TRUE);
 	else
-		rn = e2k_restriction_or (rns->len, (E2kRestriction **)rns->pdata, TRUE);
+		rn = e2k_restriction_or (rns->len, (E2kRestriction **) rns->pdata, TRUE);
 	g_ptr_array_free (rns, TRUE);
 
 	r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
-	r->value.string = (gchar *)rn;
+	r->value.string = (gchar *) rn;
 	return r;
 }
 
@@ -2033,7 +2033,7 @@ func_match (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer da
 			g_ptr_array_add (rns, rn);
 		}
 
-		rn = e2k_restriction_or (rns->len, (E2kRestriction **)rns->pdata, TRUE);
+		rn = e2k_restriction_or (rns->len, (E2kRestriction **) rns->pdata, TRUE);
 		g_ptr_array_free (rns, TRUE);
 	} else if (!strcmp (propname, "full_name")) {
 		if (!*str) {
@@ -2088,7 +2088,7 @@ func_match (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer da
 	}
 
 	r = e_sexp_result_new (f, ESEXP_RES_UNDEFINED);
-	r->value.string = (gchar *)rn;
+	r->value.string = (gchar *) rn;
 	return r;
 }
 
@@ -2128,7 +2128,7 @@ e_book_backend_exchange_build_restriction (const gchar *query,
 
 	r = e_sexp_eval (sexp);
 	if (r && r->type == ESEXP_RES_UNDEFINED)
-		rn = (E2kRestriction *)r->value.string;
+		rn = (E2kRestriction *) r->value.string;
 	else
 		rn = NULL;
 
@@ -3011,7 +3011,7 @@ e_book_backend_exchange_class_init (EBookBackendExchangeClass *klass)
 	g_ptr_array_add (field_names_array, (gpointer) E2K_PR_HTTPMAIL_HAS_ATTACHMENT);
 	for (i = 0; i < G_N_ELEMENTS (prop_mappings); i++)
 		g_ptr_array_add (field_names_array, (gpointer) prop_mappings[i].prop_name);
-	field_names = (const gchar **)field_names_array->pdata;
+	field_names = (const gchar **) field_names_array->pdata;
 	n_field_names = field_names_array->len;
 
 	/* Set the virtual methods. */
diff --git a/addressbook/e-book-backend-gal.c b/addressbook/e-book-backend-gal.c
index 71eaf70..03c7c42 100644
--- a/addressbook/e-book-backend-gal.c
+++ b/addressbook/e-book-backend-gal.c
@@ -259,7 +259,7 @@ find_book_view (EBookBackendGAL *bl)
 
 	if (e_iterator_is_valid (iter)) {
 		/* just always use the first book view */
-		EDataBookView *v = (EDataBookView*)e_iterator_get (iter);
+		EDataBookView *v = (EDataBookView*) e_iterator_get (iter);
 		if (v)
 			rv = v;
 	}
@@ -574,7 +574,7 @@ get_contact_handler (LDAPOp *op, LDAPMessage *res)
 static void
 get_contact_dtor (LDAPOp *op)
 {
-	LDAPGetContactOp *get_contact_op = (LDAPGetContactOp*)op;
+	LDAPGetContactOp *get_contact_op = (LDAPGetContactOp*) op;
 
 	g_free (get_contact_op);
 }
@@ -665,7 +665,7 @@ get_contact (EBookBackend *backend,
 			} while (gal_reconnect (bl, book_view, ldap_error));
 
 			if (ldap_error == LDAP_SUCCESS) {
-				ldap_op_add ((LDAPOp*)get_contact_op, backend, book,
+				ldap_op_add ((LDAPOp*) get_contact_op, backend, book,
 					     book_view, opid, get_contact_msgid,
 					     get_contact_handler, get_contact_dtor);
 			}
@@ -674,7 +674,7 @@ get_contact (EBookBackend *backend,
 								 opid,
 								 ldap_error_to_response (ldap_error),
 								 "");
-				get_contact_dtor ((LDAPOp*)get_contact_op);
+				get_contact_dtor ((LDAPOp*) get_contact_op);
 			}
 #if defined(ENABLE_CACHE) && ENABLE_CACHE
 		}
@@ -690,7 +690,7 @@ typedef struct {
 static void
 contact_list_handler (LDAPOp *op, LDAPMessage *res)
 {
-	LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp*)op;
+	LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp*) op;
 	EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (op->backend);
 	LDAPMessage *e;
 	gint msg_type;
@@ -779,7 +779,7 @@ contact_list_handler (LDAPOp *op, LDAPMessage *res)
 static void
 contact_list_dtor (LDAPOp *op)
 {
-	LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp*)op;
+	LDAPGetContactListOp *contact_list_op = (LDAPGetContactListOp*) op;
 
 	g_free (contact_list_op);
 }
@@ -880,7 +880,7 @@ get_contact_list (EBookBackend *backend,
 			g_free (ldap_query);
 
 			if (ldap_error == LDAP_SUCCESS) {
-				ldap_op_add ((LDAPOp*)contact_list_op, backend, book,
+				ldap_op_add ((LDAPOp*) contact_list_op, backend, book,
 					     book_view, opid, contact_list_msgid,
 					     contact_list_handler, contact_list_dtor);
 			}
@@ -889,7 +889,7 @@ get_contact_list (EBookBackend *backend,
 								      opid,
 								      ldap_error_to_response (ldap_error),
 								      NULL);
-				contact_list_dtor ((LDAPOp*)contact_list_op);
+				contact_list_dtor ((LDAPOp*) contact_list_op);
 			}
 #if defined(ENABLE_CACHE) && ENABLE_CACHE
 		}
@@ -1646,7 +1646,7 @@ poll_ldap (EBookBackendGAL *bl)
 static void
 ldap_search_handler (LDAPOp *op, LDAPMessage *res)
 {
-	LDAPSearchOp *search_op = (LDAPSearchOp*)op;
+	LDAPSearchOp *search_op = (LDAPSearchOp*) op;
 	EDataBookView *view = search_op->view;
 	EBookBackendGAL *bl = E_BOOK_BACKEND_GAL (op->backend);
 	LDAPMessage *e;
@@ -1704,7 +1704,7 @@ ldap_search_handler (LDAPOp *op, LDAPMessage *res)
 		}
 		ldap_memfree (ldap_error_msg);
 
-		if ((ldap_error == LDAP_TIMELIMIT_EXCEEDED || ldap_error == LDAP_SIZELIMIT_EXCEEDED) && can_browse ((EBookBackend *)bl))
+		if ((ldap_error == LDAP_TIMELIMIT_EXCEEDED || ldap_error == LDAP_SIZELIMIT_EXCEEDED) && can_browse ((EBookBackend *) bl))
 			/* do not complain when search limit exceeded for browsable LDAPs */
 			error = NULL;
 		else if (ldap_error == LDAP_TIMELIMIT_EXCEEDED)
@@ -1828,7 +1828,7 @@ start_book_view (EBookBackend  *backend,
 			build_query (bl, e_data_book_view_get_card_query (view), NULL, &ldap_query, &err);
 
 			/* search for anything */
-			if (!ldap_query && (!err || err->code == E_DATA_BOOK_STATUS_QUERY_REFUSED) && can_browse ((EBookBackend *)bl)) {
+			if (!ldap_query && (!err || err->code == E_DATA_BOOK_STATUS_QUERY_REFUSED) && can_browse ((EBookBackend *) bl)) {
 				ldap_query = g_strdup ("(mail=*)");
 
 				if (err)
@@ -1906,7 +1906,7 @@ start_book_view (EBookBackend  *backend,
 			build_query (bl, e_data_book_view_get_card_query (view), NULL, &ldap_query, &err);
 
 			/* search for anything */
-			if (!ldap_query &&  (!err || err->code == E_DATA_BOOK_STATUS_QUERY_REFUSED) && can_browse ((EBookBackend *)bl)) {
+			if (!ldap_query &&  (!err || err->code == E_DATA_BOOK_STATUS_QUERY_REFUSED) && can_browse ((EBookBackend *) bl)) {
 				ldap_query = g_strdup ("(mail=*)");
 				if (err)
 					g_error_free (err);
@@ -1971,7 +1971,7 @@ start_book_view (EBookBackend  *backend,
 
 				e_data_book_view_ref (view);
 
-				ldap_op_add ((LDAPOp*)op, E_BOOK_BACKEND (bl), NULL, view,
+				ldap_op_add ((LDAPOp*) op, E_BOOK_BACKEND (bl), NULL, view,
 					     0, search_msgid,
 					     ldap_search_handler, ldap_search_dtor);
 				d(printf("start_book_view: Setting op %p in book %p\n", op, view));
@@ -1995,7 +1995,7 @@ stop_book_view (EBookBackend  *backend,
 	d(printf("STOP BOOK VIEW: Getting op %p from view %p\n", op, view));
 	if (op) {
 		op->aborted = TRUE;
-		ldap_op_finished ((LDAPOp*)op);
+		ldap_op_finished ((LDAPOp*) op);
 		g_free (op);
 	}
 }
@@ -2855,7 +2855,7 @@ dispose (GObject *object)
 
 	if (bl->priv) {
 		g_static_rec_mutex_lock (&bl->priv->op_hash_mutex);
-		g_hash_table_foreach_remove (bl->priv->id_to_op, (GHRFunc)call_dtor, NULL);
+		g_hash_table_foreach_remove (bl->priv->id_to_op, (GHRFunc) call_dtor, NULL);
 		g_hash_table_destroy (bl->priv->id_to_op);
 		g_static_rec_mutex_unlock (&bl->priv->op_hash_mutex);
 		g_static_rec_mutex_free (&bl->priv->op_hash_mutex);
@@ -2941,7 +2941,7 @@ class_init (EBookBackendGALClass *klass)
 	supported_fields = NULL;
 	for (i = 0; i < G_N_ELEMENTS (prop_info); i++) {
 		supported_fields = g_list_append (supported_fields,
-						  (gchar *)e_contact_field_name (prop_info[i].field_id));
+						  (gchar *) e_contact_field_name (prop_info[i].field_id));
 	}
 	supported_fields = g_list_append (supported_fields, (gpointer) "file_as");
 
diff --git a/addressbook/e-book-backend-gal.h b/addressbook/e-book-backend-gal.h
index 541e0a2..aedad02 100644
--- a/addressbook/e-book-backend-gal.h
+++ b/addressbook/e-book-backend-gal.h
@@ -68,14 +68,14 @@
 #    define ldap_compare_ext(ld,dn,a,v,sc,cc,msg) \
         ldap_compare_extW (ld,dn,a,0,v,sc,cc,msg)
 #    define ldap_search_ext(ld,base,scope,f,a,o,sc,cc,(t),s,msg) \
-        ldap_search_extW (ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL)t)?((PLDAP_TIMEVAL)t)->tv_sec:0,s,msg)
+        ldap_search_extW (ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL) t)?((PLDAP_TIMEVAL) t)->tv_sec:0,s,msg)
 #    define ldap_start_tls_s(ld,sc,cc) \
         ldap_start_tls_sW (ld,0,0,sc,cc)
 #  else /* !UNICODE */
 #    define ldap_compare_ext(ld,dn,a,v,sc,cc,msg) \
         ldap_compare_extA (ld,dn,a,0,v,sc,cc,msg)
 #    define ldap_search_ext(ld,base,scope,f,a,o,sc,cc,t,s,msg) \
-        ldap_search_extA (ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL)t)?((PLDAP_TIMEVAL)t)->tv_sec:0,s,msg)
+        ldap_search_extA (ld,base,scope,f,a,o,sc,cc,((PLDAP_TIMEVAL) t)?((PLDAP_TIMEVAL) t)->tv_sec:0,s,msg)
 #    define ldap_start_tls_s(ld,sc,cc) \
         ldap_start_tls_sA (ld,0,0,sc,cc)
 #  endif /* UNICODE */
diff --git a/calendar/e-cal-backend-exchange-calendar.c b/calendar/e-cal-backend-exchange-calendar.c
index e71cc40..2c7ecc2 100644
--- a/calendar/e-cal-backend-exchange-calendar.c
+++ b/calendar/e-cal-backend-exchange-calendar.c
@@ -459,7 +459,7 @@ get_changed_events (ECalBackendExchange *cbex)
 	/* OWA usually sends the attachment and whole event body as part of
 		PR_INTERNET_CONTENT property. Fetch events created from OWA */
 	iter = e_folder_exchange_bpropfind_start (cbex->folder, NULL,
-						  (const gchar **)hrefs->pdata,
+						  (const gchar **) hrefs->pdata,
 						  hrefs->len,
 						  new_event_properties, n_new_event_properties);
 	for (i = 0; i < hrefs->len; i++)
@@ -1307,7 +1307,7 @@ modify_object_with_href (ECalBackendSync *backend, EDataCal *cal,
 		dt.value->hour = dt.value->minute = dt.value->second = 0;
 		dt.value->zone = zone;
 
-		g_free ((gchar *)dt.tzid);
+		g_free ((gchar *) dt.tzid);
 		dt.tzid = g_strdup (icaltimezone_get_tzid (zone));
 		e_cal_component_set_dtstart (real_ecomp, &dt);
 		e_cal_component_free_datetime (&dt);
@@ -1318,7 +1318,7 @@ modify_object_with_href (ECalBackendSync *backend, EDataCal *cal,
 		dt.value->hour = dt.value->minute = dt.value->second = 0;
 		dt.value->zone = zone;
 
-		g_free ((gchar *)dt.tzid);
+		g_free ((gchar *) dt.tzid);
 		dt.tzid = g_strdup (icaltimezone_get_tzid (zone));
 		e_cal_component_set_dtend (real_ecomp, &dt);
 	}
diff --git a/calendar/e-cal-backend-exchange-tasks.c b/calendar/e-cal-backend-exchange-tasks.c
index c38121c..571b361 100644
--- a/calendar/e-cal-backend-exchange-tasks.c
+++ b/calendar/e-cal-backend-exchange-tasks.c
@@ -276,7 +276,7 @@ set_date_completed (E2kProperties *props, ECalComponent *comp)
 	}
 
 	icaltimezone_convert_time (itt,
-				   icaltimezone_get_builtin_timezone ((const gchar *)itt->zone),
+				   icaltimezone_get_builtin_timezone ((const gchar *) itt->zone),
 				   icaltimezone_get_utc_timezone ());
 	tstr = icaltime_to_e2k_time (itt);
 	e_cal_component_free_icaltimetype (itt);
@@ -633,7 +633,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
 		ecal = e_cal_component_new ();
 		icalcomp = icalcomponent_new_vtodo ();
 		e_cal_component_set_icalcomponent (ecal, icalcomp);
-		e_cal_component_set_uid (ecal, (const gchar *)uid);
+		e_cal_component_set_uid (ecal, (const gchar *) uid);
 
 		modtime = e2k_properties_get_prop (result->props,
 						   E2K_PR_DAV_LAST_MODIFIED);
@@ -703,7 +703,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
 			sl.data = &text;
 			sl.next = NULL;
 			e_cal_component_set_description_list (E_CAL_COMPONENT (ecal), &sl);
-			g_free ((gchar *)text.value);
+			g_free ((gchar *) text.value);
 		}
 
 		/* Set DUE */
@@ -711,7 +711,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
 			itzone = get_default_timezone ();
 			itt = icaltime_from_timet_with_zone (e2k_parse_timestamp (str), 0, itzone);
 			if (!icaltime_is_null_time (itt)) {
-				tzid = icaltimezone_get_tzid ((icaltimezone *)itzone);
+				tzid = icaltimezone_get_tzid ((icaltimezone *) itzone);
 				ecdatetime.value = &itt;
 				ecdatetime.tzid = tzid;
 				e_cal_component_set_due (ecal, &ecdatetime);
@@ -724,7 +724,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
 			itzone = get_default_timezone ();
 			itt = icaltime_from_timet_with_zone (e2k_parse_timestamp (str), 0, itzone);
 			if (!icaltime_is_null_time (itt)) {
-				tzid = icaltimezone_get_tzid ((icaltimezone *)itzone);
+				tzid = icaltimezone_get_tzid ((icaltimezone *) itzone);
 				ecdatetime.value = &itt;
 				ecdatetime.tzid = tzid;
 				e_cal_component_set_dtstart (ecal, &ecdatetime);
@@ -873,7 +873,7 @@ get_changed_tasks (ECalBackendExchange *cbex)
 
 	prop = PR_INTERNET_CONTENT;
 	iter = e_folder_exchange_bpropfind_start (cbex->folder, NULL,
-						(const gchar **)hrefs->pdata,
+						(const gchar **) hrefs->pdata,
 						hrefs->len, &prop, 1);
 	for (i = 0; i < hrefs->len; i++)
 		g_free (hrefs->pdata[i]);
diff --git a/calendar/e-cal-backend-exchange.c b/calendar/e-cal-backend-exchange.c
index b0bd792..34e035e 100644
--- a/calendar/e-cal-backend-exchange.c
+++ b/calendar/e-cal-backend-exchange.c
@@ -697,7 +697,7 @@ uncache (gpointer key, gpointer value, gpointer data)
 	ECalComponentId *id = g_new0 (ECalComponentId, 1);
 	ECalBackendExchangeComponent *ecomp;
 
-	ecomp = (ECalBackendExchangeComponent *)value;
+	ecomp = (ECalBackendExchangeComponent *) value;
 
 	/* FIXME Need get the recurrence id here */
 	id->uid = g_strdup (key);
@@ -1310,7 +1310,7 @@ add_timezone (ECalBackendSync *backend, EDataCal *cal,
 		return;
 	}
 
-	vtzcomp = icalcomponent_new_from_string ((gchar *)tzobj);
+	vtzcomp = icalcomponent_new_from_string ((gchar *) tzobj);
 	if (!vtzcomp) {
 		g_propagate_error (perror, EDC_ERROR (InvalidObject));
 		return;
@@ -1795,9 +1795,9 @@ get_attachment (ECalBackendExchange *cbex, const gchar *uid,
 
 	msg_content = camel_medium_get_content (CAMEL_MEDIUM (msg));
 	if (msg_content && CAMEL_IS_MULTIPART (msg_content)) {
-		multipart = (CamelMultipart *)msg_content;
+		multipart = (CamelMultipart *) msg_content;
 
-		for (i = 0; i < (gint)camel_multipart_get_number (multipart); i++) {
+		for (i = 0; i < (gint) camel_multipart_get_number (multipart); i++) {
 			part = camel_multipart_get_part (multipart, i);
 			filename = camel_mime_part_get_filename (part);
 			if (filename) {
@@ -1971,7 +1971,7 @@ receive_attachments (ECalBackendExchange *cbex, ECalComponent *comp)
 		gint len = 0;
 
 		if (!strncmp ((gchar *)l->data, "file://", 7)) {
-			attach_file = g_filename_from_uri ((gchar *)l->data, NULL, NULL);
+			attach_file = g_filename_from_uri ((gchar *) l->data, NULL, NULL);
 			fname = attach_file;
 
 			if (fname && cbex->priv->local_attachment_store && !g_str_has_prefix (fname, cbex->priv->local_attachment_store)) {
@@ -2061,7 +2061,7 @@ build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const gchar *subject
 		gchar *mime_type;
 
 		if (!strncmp ((gchar *)l->data, "file://", 7)) {
-			fname = g_filename_from_uri ((gchar *)l->data, NULL, NULL);
+			fname = g_filename_from_uri ((gchar *) l->data, NULL, NULL);
 			filename = g_path_get_basename (fname);
 			mime_filename = g_strdup (filename + strlen (uid) + 1);
 			g_free (filename);
@@ -2189,7 +2189,7 @@ get_changes (ECalBackendSync *backend, EDataCal *cal,
 	cbedata.kind = e_cal_backend_get_kind (E_CAL_BACKEND (cbex));
 	cbedata.deletes = NULL;
 	cbedata.ehash = ehash;
-	e_xmlhash_foreach_key_remove (ehash, (EXmlHashRemoveFunc)e_cal_backend_exchange_compute_changes_foreach_key, &cbedata);
+	e_xmlhash_foreach_key_remove (ehash, (EXmlHashRemoveFunc) e_cal_backend_exchange_compute_changes_foreach_key, &cbedata);
 
 	*deletes = cbedata.deletes;
 
@@ -2241,7 +2241,7 @@ e_cal_backend_exchange_lookup_timezone (const gchar *tzid,
 					gconstpointer custom,
 					GError **error)
 {
-	icaltimezone *zone = internal_get_timezone (E_CAL_BACKEND ((ECalBackendExchange *)custom), tzid);
+	icaltimezone *zone = internal_get_timezone (E_CAL_BACKEND ((ECalBackendExchange *) custom), tzid);
 
 	/* The UTC timezone is a fallback, which is not supposed
 	   to be returned in call of e_cal_check_timezones, thus skip it */
@@ -2282,7 +2282,7 @@ init (ECalBackendExchange *cbex)
 
 	cbex->priv->timezones = g_hash_table_new_full (
 		g_str_hash, g_str_equal,
-		g_free, (GDestroyNotify)icaltimezone_free);
+		g_free, (GDestroyNotify) icaltimezone_free);
 
 	cbex->priv->set_lock = g_mutex_new ();
 	cbex->priv->open_lock = g_mutex_new ();
diff --git a/calendar/e2k-cal-query.c b/calendar/e2k-cal-query.c
index 2f7cd71..80b3bf2 100644
--- a/calendar/e2k-cal-query.c
+++ b/calendar/e2k-cal-query.c
@@ -48,7 +48,7 @@ rns_array (ESExp *esexp, gint argc, ESExpResult **argv)
 			return NULL;
 		}
 
-		rns[i] = (E2kRestriction *)argv[i]->value.string;
+		rns[i] = (E2kRestriction *) argv[i]->value.string;
 	}
 
 	return rns;
@@ -98,7 +98,7 @@ func_not (ESExp *esexp, gint argc, ESExpResult **argv, gpointer data)
 
 	result = e_sexp_result_new (esexp, ESEXP_RES_UNDEFINED);
 	result->value.string = (gchar *)
-		e2k_restriction_not ((E2kRestriction *)argv[0]->value.string,
+		e2k_restriction_not ((E2kRestriction *) argv[0]->value.string,
 				     TRUE);
 
 	return result;
@@ -238,7 +238,7 @@ func_contains (ESExp *esexp, gint argc, ESExpResult **argv, gpointer user_data)
 	}
 
 	result = e_sexp_result_new (esexp, ESEXP_RES_UNDEFINED);
-	result->value.string = (gchar *)rn;
+	result->value.string = (gchar *) rn;
 
 	return result;
 }
@@ -409,7 +409,7 @@ e2k_cal_query_to_restriction (ECalBackendExchange *cbex,
 
 	result = e_sexp_eval (esexp);
 	if (result && result->type == ESEXP_RES_UNDEFINED)
-		rn = (E2kRestriction *)result->value.string;
+		rn = (E2kRestriction *) result->value.string;
 	else
 		rn = NULL;
 
diff --git a/camel/camel-exchange-folder.c b/camel/camel-exchange-folder.c
index 1ceab1e..8c5eb91 100644
--- a/camel/camel-exchange-folder.c
+++ b/camel/camel-exchange-folder.c
@@ -291,7 +291,7 @@ exchange_folder_cache_xfer (CamelExchangeFolder *folder_source,
 	gint i;
 
 	for (i = 0; i < src_uids->len; i++) {
-		if (!*(gchar *)dest_uids->pdata[i])
+		if (!*(gchar *) dest_uids->pdata[i])
 			continue;
 
 		src = camel_data_cache_get (folder_source->cache, "cache",
@@ -466,7 +466,7 @@ exchange_folder_append_message_sync (CamelFolder *folder,
 	if (!camel_exchange_store_connected (store, cancellable, NULL))
 		return camel_exchange_journal_append (
 			(CamelExchangeJournal *)
-			((CamelExchangeFolder *)folder)->journal,
+			((CamelExchangeFolder *) folder)->journal,
 			message, info, appended_uid, cancellable, error);
 
 	byte_array = g_byte_array_new ();
@@ -864,7 +864,7 @@ camel_exchange_folder_add_message (CamelExchangeFolder *exch,
 	g_object_unref (stream);
 
 	info = camel_folder_summary_info_new_from_message (folder->summary, msg, NULL);
-	einfo = (CamelExchangeMessageInfo *)info;
+	einfo = (CamelExchangeMessageInfo *) info;
 
 	if (einfo->thread_index) {
 		CamelSummaryMessageID *parent;
@@ -923,7 +923,7 @@ camel_exchange_folder_remove_message (CamelExchangeFolder *exch,
 	if (!info)
 		return;
 
-	einfo = (CamelExchangeMessageInfo *)info;
+	einfo = (CamelExchangeMessageInfo *) info;
 	if (einfo->thread_index) {
 		gpointer key, value;
 
@@ -976,7 +976,7 @@ camel_exchange_folder_update_message_flags (CamelExchangeFolder *exch,
 	CamelMessageInfoBase *info;
 	CamelFolderChangeInfo *changes;
 
-	info = (CamelMessageInfoBase *)camel_folder_summary_uid (folder->summary, uid);
+	info = (CamelMessageInfoBase *) camel_folder_summary_uid (folder->summary, uid);
 	if (!info)
 		return;
 
@@ -1013,7 +1013,7 @@ camel_exchange_folder_update_message_flags_ex (CamelExchangeFolder *exch,
 	CamelMessageInfoBase *info;
 	CamelFolderChangeInfo *changes;
 
-	info = (CamelMessageInfoBase *)camel_folder_summary_uid (folder->summary, uid);
+	info = (CamelMessageInfoBase *) camel_folder_summary_uid (folder->summary, uid);
 	if (!info)
 		return;
 
@@ -1055,7 +1055,7 @@ camel_exchange_folder_update_message_tag (CamelExchangeFolder *exch,
 	CamelMessageInfoBase *info;
 	CamelFolderChangeInfo *changes;
 
-	info = (CamelMessageInfoBase *)camel_folder_summary_uid (folder->summary, uid);
+	info = (CamelMessageInfoBase *) camel_folder_summary_uid (folder->summary, uid);
 	if (!info)
 		return;
 
@@ -1090,7 +1090,7 @@ camel_exchange_folder_construct (CamelFolder *folder,
                                  GCancellable *cancellable,
                                  GError **error)
 {
-	CamelExchangeFolder *exch = (CamelExchangeFolder *)folder;
+	CamelExchangeFolder *exch = (CamelExchangeFolder *) folder;
 	gchar *summary_file, *journal_file, *path;
 	GPtrArray *summary, *uids, *hrefs;
 	GByteArray *flags;
@@ -1152,7 +1152,7 @@ camel_exchange_folder_construct (CamelFolder *folder,
 	len = camel_folder_summary_count (folder->summary);
 	for (i = 0; i < len; i++) {
 		info = camel_folder_summary_index (folder->summary, i);
-		einfo = (CamelExchangeMessageInfo *)info;
+		einfo = (CamelExchangeMessageInfo *) info;
 
 		if (einfo->thread_index && einfo->info.message_id.id.id) {
 			g_hash_table_insert (exch->thread_index_to_message_id,
@@ -1179,9 +1179,9 @@ camel_exchange_folder_construct (CamelFolder *folder,
 		for (i = 0; i < summary->len; i++) {
 			uids->pdata[i] = summary->pdata[i];
 			info = camel_folder_summary_uid (folder->summary, uids->pdata[i]);
-			flags->data[i] = ((CamelMessageInfoBase *)info)->flags & CAMEL_EXCHANGE_SERVER_FLAGS;
-			hrefs->pdata[i] = ((CamelExchangeMessageInfo *)info)->href;
-			//camel_tag_list_free (&((CamelMessageInfoBase *)info)->user_tags);
+			flags->data[i] = ((CamelMessageInfoBase *) info)->flags & CAMEL_EXCHANGE_SERVER_FLAGS;
+			hrefs->pdata[i] = ((CamelExchangeMessageInfo *) info)->href;
+			//camel_tag_list_free (&((CamelMessageInfoBase *) info)->user_tags);
 		}
 
 		camel_operation_push_message (
diff --git a/camel/camel-exchange-journal.c b/camel/camel-exchange-journal.c
index 0b77de3..e76380d 100644
--- a/camel/camel-exchange-journal.c
+++ b/camel/camel-exchange-journal.c
@@ -172,7 +172,7 @@ exchange_entry_play_transfer (CamelOfflineJournal *journal,
 			folder->summary, message, NULL);
 		g_object_unref (message);
 		real->uid = camel_pstring_strdup (
-			(gchar *)xuids->pdata[0]);
+			(gchar *) xuids->pdata[0]);
 		/* Transfer flags */
 		exchange_message_info_dup_to (
 			(CamelMessageInfoBase *) real,
diff --git a/camel/camel-exchange-provider.c b/camel/camel-exchange-provider.c
index 5463043..6884844 100644
--- a/camel/camel-exchange-provider.c
+++ b/camel/camel-exchange-provider.c
@@ -204,7 +204,7 @@ exchange_username (const gchar *user)
 static guint
 exchange_url_hash (gconstpointer key)
 {
-	const CamelURL *u = (CamelURL *)key;
+	const CamelURL *u = (CamelURL *) key;
 	guint hash = 0;
 
 	if (u->user)
diff --git a/camel/camel-exchange-summary.c b/camel/camel-exchange-summary.c
index cc79bb8..de8ddd9 100644
--- a/camel/camel-exchange-summary.c
+++ b/camel/camel-exchange-summary.c
@@ -163,7 +163,7 @@ exchange_summary_message_info_migrate (CamelFolderSummary *summary,
 
 	info = folder_summary_class->message_info_migrate (summary, in);
 	if (info) {
-		einfo = (CamelExchangeMessageInfo *)info;
+		einfo = (CamelExchangeMessageInfo *) info;
 
 		if (camel_file_util_decode_string (in, &thread_index) == -1)
 			goto error;
@@ -207,7 +207,7 @@ exchange_summary_message_info_new_from_header (CamelFolderSummary *summary,
 	if (!info)
 		return info;
 
-	einfo = (CamelExchangeMessageInfo *)info;
+	einfo = (CamelExchangeMessageInfo *) info;
 	thread_index = camel_header_raw_find (&h, "Thread-Index", NULL);
 	if (thread_index)
 		einfo->thread_index = g_strdup (thread_index + 1);
@@ -225,7 +225,7 @@ exchange_summary_message_info_free (CamelFolderSummary *summary,
 	folder_summary_class = CAMEL_FOLDER_SUMMARY_CLASS (
 		camel_exchange_summary_parent_class);
 
-	einfo = (CamelExchangeMessageInfo *)info;
+	einfo = (CamelExchangeMessageInfo *) info;
 
 	g_free (einfo->href);
 	g_free (einfo->thread_index);
@@ -282,7 +282,7 @@ static CamelMIRecord *
 exchange_summary_message_info_to_db (CamelFolderSummary *s,
                                      CamelMessageInfo *info)
 {
-	CamelExchangeMessageInfo *einfo = (CamelExchangeMessageInfo *)info;
+	CamelExchangeMessageInfo *einfo = (CamelExchangeMessageInfo *) info;
 	CamelFolderSummaryClass *folder_summary_class;
 	struct _CamelMIRecord *mir;
 
@@ -310,7 +310,7 @@ exchange_summary_message_info_from_db (CamelFolderSummary *s,
 	info = folder_summary_class->message_info_from_db (s, mir);
 	if (info) {
 		gchar *part = mir->bdata;
-		einfo = (CamelExchangeMessageInfo *)info;
+		einfo = (CamelExchangeMessageInfo *) info;
 		einfo->thread_index = bdata_extract_string (&part);
 		einfo->href = bdata_extract_string (&part);
 	}
@@ -555,25 +555,25 @@ camel_exchange_summary_add_offline (CamelFolderSummary *summary,
 	const CamelTag *tag;
 
 	/* Create summary entry */
-	mi = (CamelMessageInfoBase *)camel_folder_summary_info_new_from_message (summary, message, NULL);
+	mi = (CamelMessageInfoBase *) camel_folder_summary_info_new_from_message (summary, message, NULL);
 
 	/* Copy flags 'n' tags */
 	mi->flags = camel_message_info_flags (info);
 
 	flag = camel_message_info_user_flags (info);
 	while (flag) {
-		camel_message_info_set_user_flag ((CamelMessageInfo *)mi, flag->name, TRUE);
+		camel_message_info_set_user_flag ((CamelMessageInfo *) mi, flag->name, TRUE);
 		flag = flag->next;
 	}
 	tag = camel_message_info_user_tags (info);
 	while (tag) {
-		camel_message_info_set_user_tag ((CamelMessageInfo *)mi, tag->name, tag->value);
+		camel_message_info_set_user_tag ((CamelMessageInfo *) mi, tag->name, tag->value);
 		tag = tag->next;
 	}
 
 	mi->size = camel_message_info_size (info);
 	mi->uid = camel_pstring_strdup (uid);
-	camel_folder_summary_add (summary, (CamelMessageInfo *)mi);
+	camel_folder_summary_add (summary, (CamelMessageInfo *) mi);
 }
 
 /**
diff --git a/camel/camel-exchange-transport.c b/camel/camel-exchange-transport.c
index 172f5a7..7ecd927 100644
--- a/camel/camel-exchange-transport.c
+++ b/camel/camel-exchange-transport.c
@@ -85,7 +85,7 @@ exchange_transport_send_to_sync (CamelTransport *transport,
 			g_ptr_array_free (recipients_array, TRUE);
 			return FALSE;
 		}
-		g_ptr_array_add (recipients_array, (gchar *)addr);
+		g_ptr_array_add (recipients_array, (gchar *) addr);
 	}
 
 	if (!camel_internet_address_get (CAMEL_INTERNET_ADDRESS (from), 0, NULL, &addr)) {
diff --git a/camel/camel-exchange-utils.c b/camel/camel-exchange-utils.c
index 70026c3..4d712f1 100644
--- a/camel/camel-exchange-utils.c
+++ b/camel/camel-exchange-utils.c
@@ -355,7 +355,7 @@ message_remove_at_index (ExchangeFolder *mfld, CamelFolder *folder, gint index)
 		g_static_rec_mutex_lock (&mfld->ed->changed_msgs_mutex);
 
 		for (i = 0; i < mfld->changed_messages->len; i++) {
-			if (mfld->changed_messages->pdata[i] == (gpointer)mmsg) {
+			if (mfld->changed_messages->pdata[i] == (gpointer) mmsg) {
 				g_ptr_array_remove_index_fast (mfld->changed_messages, i);
 				break;
 			}
@@ -585,7 +585,7 @@ refresh_folder_internal (ExchangeFolder *mfld,
 	 */
 
 	iter = e_folder_exchange_bpropfind_start (mfld->folder, NULL,
-						  (const gchar **)mapi_hrefs->pdata,
+						  (const gchar **) mapi_hrefs->pdata,
 						  mapi_hrefs->len,
 						  mapi_message_props,
 						  G_N_ELEMENTS (mapi_message_props));
@@ -602,7 +602,7 @@ refresh_folder_internal (ExchangeFolder *mfld,
 			continue;
 		n = GPOINTER_TO_INT (value);
 
-		rmp = &((struct refresh_message *)messages->data)[n];
+		rmp = &((struct refresh_message *) messages->data)[n];
 		rmp->headers = mail_util_mapi_to_smtp_headers (result->props);
 
 		got++;
@@ -683,7 +683,7 @@ refresh_folder_internal (ExchangeFolder *mfld,
 	/*
 	 * CLEANUP
 	 */
-	rmp = (struct refresh_message *)messages->data;
+	rmp = (struct refresh_message *) messages->data;
 	for (i = 0; i < messages->len; i++) {
 		g_free (rmp[i].uid);
 		g_free (rmp[i].href);
@@ -924,8 +924,8 @@ exchange_message_uid_cmp (gconstpointer a, gconstpointer b)
 {
 	ExchangeMessage **mmsg1, **mmsg2;
 
-	mmsg1 = (ExchangeMessage **)a;
-	mmsg2 = (ExchangeMessage **)b;
+	mmsg1 = (ExchangeMessage **) a;
+	mmsg2 = (ExchangeMessage **) b;
 
 	return strcmp ((*mmsg1)->uid, (*mmsg2)->uid);
 }
@@ -1392,7 +1392,7 @@ mark_read (EFolder *folder, GPtrArray *hrefs, gboolean read)
 	e2k_properties_set_bool (props, E2K_PR_HTTPMAIL_READ, read);
 
 	iter = e_folder_exchange_bproppatch_start (folder, NULL,
-						   (const gchar **)hrefs->pdata,
+						   (const gchar **) hrefs->pdata,
 						   hrefs->len, props, FALSE);
 	e2k_properties_free (props);
 
@@ -1548,12 +1548,12 @@ process_flags (gpointer user_data)
 	if (seen || unseen) {
 		if (seen) {
 			mark_read (mfld->folder, seen, TRUE);
-			g_ptr_array_foreach (seen, (GFunc)g_free, NULL);
+			g_ptr_array_foreach (seen, (GFunc) g_free, NULL);
 			g_ptr_array_free (seen, TRUE);
 		}
 		if (unseen) {
 			mark_read (mfld->folder, unseen, FALSE);
-			g_ptr_array_foreach (unseen, (GFunc)g_free, NULL);
+			g_ptr_array_foreach (unseen, (GFunc) g_free, NULL);
 			g_ptr_array_free (unseen, TRUE);
 		}
 
@@ -1599,7 +1599,7 @@ process_flags (gpointer user_data)
 			   show the mail folder again if the deletion fails in
 			   such public folder */
 			iter = e_folder_exchange_bdelete_start (mfld->folder, NULL,
-								(const gchar **)deleted->pdata,
+								(const gchar **) deleted->pdata,
 								deleted->len);
 		}
 		g_ptr_array_free (deleted, FALSE);
@@ -2122,7 +2122,7 @@ get_folder_info_data (ExchangeData *ed, const gchar *top, guint32 store_flags, G
 				g_hash_table_insert (known_uris, (gchar *) uri, GINT_TO_POINTER (1));
 
 			g_ptr_array_add (*names, g_strdup (name));
-			g_ptr_array_add (*uris, (gchar *)uri);
+			g_ptr_array_add (*uris, (gchar *) uri);
 			g_array_append_val (*unread, unread_count);
 			g_array_append_val (*flags, folder_flags);
 		}
@@ -2322,7 +2322,7 @@ camel_exchange_utils_get_folder (CamelService *service,
 		g_ptr_array_add (mfld->messages, mmsg);
 		g_hash_table_insert (mfld->messages_by_uid, mmsg->uid, mmsg);
 
-		if (hrefs->pdata[i] && *((gchar *)hrefs->pdata[i])) {
+		if (hrefs->pdata[i] && *((gchar *) hrefs->pdata[i])) {
 			mmsg->href = g_strdup (hrefs->pdata[i]);
 			g_hash_table_insert (mfld->messages_by_href, mmsg->href, mmsg);
 		}
@@ -2339,7 +2339,7 @@ camel_exchange_utils_get_folder (CamelService *service,
 	g_signal_connect (mfld->folder, "changed",
 			  G_CALLBACK (storage_folder_changed), mfld);
 
-	g_hash_table_insert (ed->folders_by_name, (gchar *)mfld->name, mfld);
+	g_hash_table_insert (ed->folders_by_name, (gchar *) mfld->name, mfld);
 	folder_changed (mfld);
 
 	*readonly = ((mfld->access & (MAPI_ACCESS_MODIFY | MAPI_ACCESS_CREATE_CONTENTS)) == 0);
@@ -2478,7 +2478,7 @@ camel_exchange_utils_expunge_uids (CamelService *service,
 		camel_folder_freeze (folder);
 
 	iter = e_folder_exchange_bdelete_start (mfld->folder, NULL,
-						(const gchar **)hrefs->pdata,
+						(const gchar **) hrefs->pdata,
 						hrefs->len);
 	ndeleted = 0;
 	while ((result = e2k_result_iter_next (iter))) {
@@ -2793,7 +2793,7 @@ camel_exchange_utils_get_message (CamelService *service,
 		goto error;
 
 	*message_bytes = g_byte_array_sized_new (len);
-	g_byte_array_append (*message_bytes, (const guint8 *)body, len);
+	g_byte_array_append (*message_bytes, (const guint8 *) body, len);
 
 	res = TRUE;
 
@@ -3118,7 +3118,7 @@ camel_exchange_utils_send_message (CamelService *service,
 				timestamp);
 	g_free (timestamp);
 
-	g_string_append_len (data, (const gchar *)message->data, message->len);
+	g_string_append_len (data, (const gchar *) message->data, message->len);
 
 	msg = e2k_soup_message_new_full (ed->ctx, ed->mail_submission_uri,
 					 SOUP_METHOD_PUT, "message/rfc821",
@@ -3308,7 +3308,7 @@ camel_exchange_utils_rename_folder (CamelService *service,
 		mfld->name = e_folder_exchange_get_path (folder) + 1;
 
 		g_hash_table_steal (ed->folders_by_name, old_name);
-		g_hash_table_insert (ed->folders_by_name, (gchar *)mfld->name, mfld);
+		g_hash_table_insert (ed->folders_by_name, (gchar *) mfld->name, mfld);
 
 		get_folder_info_data (ed, new_name, CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, NULL, &names, &uris, &unread, &flags);
 
@@ -3371,7 +3371,7 @@ camel_exchange_utils_rename_folder (CamelService *service,
 			mfld->name = e_folder_exchange_get_path (folder) + 1;
 
 			g_hash_table_steal (ed->folders_by_name, old_name_remove);
-			g_hash_table_insert (ed->folders_by_name, (gchar *)mfld->name, mfld);
+			g_hash_table_insert (ed->folders_by_name, (gchar *) mfld->name, mfld);
 
 			g_hash_table_remove_all (mfld->messages_by_href);
 
diff --git a/eplugin/exchange-account-setup.c b/eplugin/exchange-account-setup.c
index afdb0ed..99c7155 100644
--- a/eplugin/exchange-account-setup.c
+++ b/eplugin/exchange-account-setup.c
@@ -211,7 +211,7 @@ org_gnome_exchange_settings (EPlugin *epl, EConfigHookItemFactoryData *data)
 	GtkTextBuffer *buffer;
 	GtkTextIter start, end;
 
-	target_account = (EMConfigTargetAccount *)data->config->target;
+	target_account = (EMConfigTargetAccount *) data->config->target;
 	account = target_account->modified_account;
 
 	source_url = e_account_get_string (account,  E_ACCOUNT_SOURCE_URL);
@@ -446,7 +446,7 @@ gal_auth_to_string (E2kAutoconfigGalAuthPref ad_auth)
 static void
 owa_authenticate_user (GtkWidget *button, EConfig *config)
 {
-	EMConfigTargetAccount *target_account = (EMConfigTargetAccount *)config->target;
+	EMConfigTargetAccount *target_account = (EMConfigTargetAccount *) config->target;
 	E2kAutoconfigResult result;
 	CamelURL *url=NULL;
 	gboolean remember_password;
@@ -555,7 +555,7 @@ owa_editor_entry_changed (GtkWidget *entry, EConfig *config)
 	const gchar *ssl = NULL;
 	CamelURL *url, *owaurl = NULL;
 	gchar *url_string, *uri;
-	EMConfigTargetAccount *target = (EMConfigTargetAccount *)config->target;
+	EMConfigTargetAccount *target = (EMConfigTargetAccount *) config->target;
 	GtkWidget *button = g_object_get_data((GObject *)entry, "authenticate-button");
 	EAccount *account;
 	gint active = FALSE;
@@ -569,7 +569,7 @@ owa_editor_entry_changed (GtkWidget *entry, EConfig *config)
 	if (target_url && target_url[0] != '\0')
 		url = camel_url_new (target_url, NULL);
 	else url = NULL;
-	uri = g_strdup (gtk_entry_get_text ((GtkEntry *)entry));
+	uri = g_strdup (gtk_entry_get_text ((GtkEntry *) entry));
 
 	g_strstrip (uri);
 
@@ -632,7 +632,7 @@ mailbox_editor_entry_changed (GtkWidget *entry, EConfig *config)
 	EAccount *account;
 	gchar *mailbox;
 
-	target = (EMConfigTargetAccount *)config->target;
+	target = (EMConfigTargetAccount *) config->target;
 	mailbox = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
 
 	g_strstrip (mailbox);
@@ -661,7 +661,7 @@ want_mailbox_toggled (GtkWidget *toggle, EConfig *config)
 
 		gtk_widget_set_sensitive (entry, is_active);
 
-		target = (EMConfigTargetAccount *)config->target;
+		target = (EMConfigTargetAccount *) config->target;
 		mailbox = gtk_entry_get_text (GTK_ENTRY (entry));
 
 		account = target->modified_account;
@@ -709,7 +709,7 @@ org_gnome_exchange_owa_url (EPlugin *epl, EConfigHookItemFactoryData *data)
 	gint row;
 	GtkWidget *hbox, *label, *button;
 
-	target_account = (EMConfigTargetAccount *)data->config->target;
+	target_account = (EMConfigTargetAccount *) data->config->target;
 	account = target_account->modified_account;
 
 	source_url = e_account_get_string (account,  E_ACCOUNT_SOURCE_URL);
@@ -778,7 +778,7 @@ org_gnome_exchange_owa_url (EPlugin *epl, EConfigHookItemFactoryData *data)
 	camel_url_free (url);
 	if (owa_url)
 		gtk_entry_set_text (GTK_ENTRY (owa_entry), owa_url);
-	gtk_label_set_mnemonic_widget ((GtkLabel *)label, owa_entry);
+	gtk_label_set_mnemonic_widget ((GtkLabel *) label, owa_entry);
 
 	button = gtk_button_new_with_mnemonic (_("A_uthenticate"));
 	gtk_widget_set_sensitive (button, owa_url && owa_url[0]);
@@ -844,7 +844,7 @@ org_gnome_exchange_owa_url (EPlugin *epl, EConfigHookItemFactoryData *data)
 gboolean
 org_gnome_exchange_check_options (EPlugin *epl, EConfigHookPageCheckData *data)
 {
-	EMConfigTargetAccount *target = (EMConfigTargetAccount *)data->config->target;
+	EMConfigTargetAccount *target = (EMConfigTargetAccount *) data->config->target;
 	gint status = TRUE;
 
 	/* We assume that if the host is set, then the setting is valid.
@@ -955,7 +955,7 @@ exchange_check_authtype (GtkWidget *w, EConfig *config)
 static void
 exchange_authtype_changed (GtkComboBox *dropdown, EConfig *config)
 {
-	EMConfigTargetAccount *target = (EMConfigTargetAccount *)config->target;
+	EMConfigTargetAccount *target = (EMConfigTargetAccount *) config->target;
 	gint id = gtk_combo_box_get_active (dropdown);
 	GtkTreeModel *model;
 	GtkTreeIter iter;
@@ -1015,7 +1015,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
 	GList *authtypes, *l, *ll;
 	ExchangeAccount *ex_account;
 
-	target_account = (EMConfigTargetAccount *)data->config->target;
+	target_account = (EMConfigTargetAccount *) data->config->target;
 	account = target_account->modified_account;
 
 	source_url = e_account_get_string (account, E_ACCOUNT_SOURCE_URL);
@@ -1050,7 +1050,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
 	label_hide = gtk_label_new("\n");
 
 	hbox = gtk_hbox_new (FALSE, 6);
-	dropdown = (GtkComboBox * )gtk_combo_box_new ();
+	dropdown = (GtkComboBox * ) gtk_combo_box_new ();
 	gtk_label_set_mnemonic_widget (GTK_LABEL (auth_label), GTK_WIDGET (dropdown));
 
 	button = gtk_button_new_with_mnemonic (_("Ch_eck for Supported Types"));
@@ -1066,7 +1066,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
 		if (authtypes) {
 			for (ll = authtypes; ll; ll = g_list_next (ll))
 				if (!strcmp (authtype->authproto,
-					((CamelServiceAuthType *)ll->data)->authproto))
+					((CamelServiceAuthType *) ll->data)->authproto))
 					break;
 			avail = ll != NULL;
 		}
@@ -1088,14 +1088,14 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
 		}
 	}
 
-	gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store);
+	gtk_combo_box_set_model (dropdown, (GtkTreeModel *) store);
 	gtk_combo_box_set_active (dropdown, -1);
 
 	if (auth_changed_id == 0) {
 		GtkCellRenderer *cell = gtk_cell_renderer_text_new ();
 
-		gtk_cell_layout_pack_start ((GtkCellLayout *)dropdown, cell, TRUE);
-		gtk_cell_layout_set_attributes ((GtkCellLayout *)dropdown, cell,
+		gtk_cell_layout_pack_start ((GtkCellLayout *) dropdown, cell, TRUE);
+		gtk_cell_layout_set_attributes ((GtkCellLayout *) dropdown, cell,
 						"text", 0, "strikethrough", 2, NULL);
 
 		auth_changed_id = g_signal_connect (dropdown,
@@ -1131,7 +1131,7 @@ org_gnome_exchange_auth_section (EPlugin *epl, EConfigHookItemFactoryData *data)
 GtkWidget *
 org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactoryData *data)
 {
-	EMConfigTargetFolder *target=  (EMConfigTargetFolder *)data->config->target;
+	EMConfigTargetFolder *target=  (EMConfigTargetFolder *) data->config->target;
 	CamelFolder *cml_folder = target->folder;
 	CamelService *service;
 	CamelProvider *provider;
@@ -1173,7 +1173,7 @@ org_gnome_exchange_show_folder_size_factory (EPlugin *epl, EConfigHookItemFactor
 		folder_size = g_strdup (_("0 KB"));
 
 	hbx_size = (GtkHBox*) gtk_hbox_new (FALSE, 0);
-	vbx = (GtkVBox *)gtk_notebook_get_nth_page (GTK_NOTEBOOK (data->parent), 0);
+	vbx = (GtkVBox *) gtk_notebook_get_nth_page (GTK_NOTEBOOK (data->parent), 0);
 
 	lbl_size = gtk_label_new_with_mnemonic (_("Size:"));
 	lbl_size_val = gtk_label_new_with_mnemonic (_(folder_size));
diff --git a/eplugin/exchange-calendar.c b/eplugin/exchange-calendar.c
index 4a1f472..37ea2fe 100644
--- a/eplugin/exchange-calendar.c
+++ b/eplugin/exchange-calendar.c
@@ -95,10 +95,10 @@ e_exchange_calendar_get_calendars (ECalSourceType ftype)
 
 	for (i=0; i<folder_array->len; ++i) {
 		folder = g_ptr_array_index (folder_array, i);
-		type = (gchar *)e_folder_get_type_string (folder);
+		type = (gchar *) e_folder_get_type_string (folder);
 
 		if (!strcmp (type, tstring)) {
-			tmp = (gchar *)e_folder_get_physical_uri (folder);
+			tmp = (gchar *) e_folder_get_physical_uri (folder);
 			if (g_str_has_prefix (tmp, uri_prefix)) {
 				ruri = g_strdup (tmp+prefix_len);
 				g_ptr_array_add (calendar_list, ruri);
diff --git a/eplugin/exchange-contacts.c b/eplugin/exchange-contacts.c
index a0f159e..04ece23 100644
--- a/eplugin/exchange-contacts.c
+++ b/eplugin/exchange-contacts.c
@@ -211,7 +211,7 @@ e_exchange_contacts_pcontacts (EPlugin *epl, EConfigHookItemFactoryData *data)
 	g_free (uri_text);
 
 	if (contacts_src_exists && is_personal ) {
-		abook_name = (gchar *)e_source_peek_name (source);
+		abook_name = (gchar *) e_source_peek_name (source);
 		model = exchange_account_folder_size_get_model (account);
 		if (model)
 			folder_size = g_strdup_printf (_("%s KB"), exchange_folder_size_get_val (model, abook_name));
diff --git a/eplugin/exchange-delegates-user.c b/eplugin/exchange-delegates-user.c
index 133446f..d7ffb61 100644
--- a/eplugin/exchange-delegates-user.c
+++ b/eplugin/exchange-delegates-user.c
@@ -629,7 +629,7 @@ exchange_delegates_user_new_from_gc (E2kGlobalCatalog *gc,
 		p--;
 	g_byte_array_append (user->entryid, creator_entryid->data,
 			     p - creator_entryid->data + 1);
-	g_byte_array_append (user->entryid, (guint8*)entry->legacy_exchange_dn,
+	g_byte_array_append (user->entryid, (guint8*) entry->legacy_exchange_dn,
 			     strlen (entry->legacy_exchange_dn));
 	g_byte_array_append (user->entryid, (guint8*)"", 1);
 
diff --git a/eplugin/exchange-delegates.c b/eplugin/exchange-delegates.c
index 9ca718b..8253957 100644
--- a/eplugin/exchange-delegates.c
+++ b/eplugin/exchange-delegates.c
@@ -225,16 +225,16 @@ get_folder_security (ExchangeDelegates *delegates)
 		delegates->folder[i].uri = exchange_account_get_standard_uri (
 			delegates->account, exchange_delegates_user_folder_names[i]);
 		if (delegates->folder[i].uri) {
-			g_ptr_array_add (hrefs, (gchar *)e2k_uri_relative (
+			g_ptr_array_add (hrefs, (gchar *) e2k_uri_relative (
 						 delegates->account->home_uri,
 						 delegates->folder[i].uri));
 		}
 	}
-	g_ptr_array_add (hrefs, (gchar *)exchange_localfreebusy_path);
+	g_ptr_array_add (hrefs, (gchar *) exchange_localfreebusy_path);
 
 	iter = e2k_context_bpropfind_start (
 		ctx, NULL, delegates->account->home_uri,
-		(const gchar **)hrefs->pdata, hrefs->len,
+		(const gchar **) hrefs->pdata, hrefs->len,
 		sd_props, G_N_ELEMENTS (sd_props));
 	g_ptr_array_free (hrefs, TRUE);
 
@@ -873,7 +873,7 @@ delegates_destroy (ExchangeDelegates *delegates)
 	if (delegates->freebusy_folder.sd)
 		g_object_unref (delegates->freebusy_folder.sd);
 	if (delegates->freebusy_folder.uri)
-		g_free ((gchar *)delegates->freebusy_folder.uri);
+		g_free ((gchar *) delegates->freebusy_folder.uri);
 
 	g_free (delegates);
 }
diff --git a/eplugin/exchange-folder-size-display.c b/eplugin/exchange-folder-size-display.c
index 4e1956a..3c82857 100644
--- a/eplugin/exchange-folder-size-display.c
+++ b/eplugin/exchange-folder-size-display.c
@@ -83,7 +83,7 @@ format_size_func (GtkTreeViewColumn *col,
                   GtkTreeIter       *iter,
                  gpointer           user_data)
 {
-	GtkCellRendererText *cell = (GtkCellRendererText *)renderer;
+	GtkCellRendererText *cell = (GtkCellRendererText *) renderer;
 	gdouble folder_size;
 	gchar * new_text;
 
@@ -186,7 +186,7 @@ exchange_folder_size_display (GtkListStore *model, GtkWidget *parent)
 	g_free (col_name);
 
 	l = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
-	cell = (GtkCellRenderer *)l->data;
+	cell = (GtkCellRenderer *) l->data;
 	gtk_tree_view_column_set_cell_data_func (column, cell, format_size_func, NULL, NULL );
 	g_list_free (l);
 
diff --git a/eplugin/exchange-folder.c b/eplugin/exchange-folder.c
index 1555d81..a02832a 100644
--- a/eplugin/exchange-folder.c
+++ b/eplugin/exchange-folder.c
@@ -73,7 +73,7 @@ exchange_get_folder (gchar *uri, CamelFolder *folder, gpointer data)
 	CamelFolderInfo *info;
 	gchar *name = NULL;
 	gchar *stored_name = NULL;
-	gchar *target_uri = (gchar *)data;
+	gchar *target_uri = (gchar *) data;
 	ExchangeAccount *account = NULL;
 
 	g_return_if_fail (folder != NULL);
diff --git a/eplugin/exchange-mail-send-options.c b/eplugin/exchange-mail-send-options.c
index 745d1e7..85fb5d5 100644
--- a/eplugin/exchange-mail-send-options.c
+++ b/eplugin/exchange-mail-send-options.c
@@ -47,7 +47,7 @@ append_to_header (ExchangeSendOptionsDialog *dialog, gint state, gpointer data)
 	struct _camel_header_address *addr;
 	struct _camel_header_address *sender_addr;
 
-	composer = (EMsgComposer *)data;
+	composer = (EMsgComposer *) data;
 	if (state == GTK_RESPONSE_OK) {
 		if (dialog->options->importance) {
 			switch (dialog->options->importance) {
diff --git a/eplugin/exchange-operations.c b/eplugin/exchange-operations.c
index 719f7d9..74eb0da 100644
--- a/eplugin/exchange-operations.c
+++ b/eplugin/exchange-operations.c
@@ -96,7 +96,7 @@ gboolean
 exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *parent, const gchar *ruri)
 {
 	GtkTreeIter iter;
-	gchar *luri=(gchar *)ruri;
+	gchar *luri=(gchar *) ruri;
 	gchar nodename[80];
 	gchar *uri;
 	gboolean status, found;
@@ -149,7 +149,7 @@ exchange_operations_cta_add_node_to_tree (GtkTreeStore *store, GtkTreeIter *pare
 void
 exchange_operations_cta_select_node_from_tree (GtkTreeStore *store, GtkTreeIter *parent, const gchar *nuri, const gchar *ruri, GtkTreeSelection *selection)
 {
-	gchar *luri=(gchar *)nuri;
+	gchar *luri=(gchar *) nuri;
 	gchar nodename[80];
 	GtkTreeIter iter;
 	gboolean status;
diff --git a/eplugin/exchange-send-options.c b/eplugin/exchange-send-options.c
index b4de58b..7900850 100644
--- a/eplugin/exchange-send-options.c
+++ b/eplugin/exchange-send-options.c
@@ -136,7 +136,7 @@ exchange_send_options_get_widgets_data (ExchangeSendOptionsDialog *sod)
 		}
 
 		if (count > 1) {
-			e_alert_run_dialog_for_args ((GtkWindow *)priv->main,
+			e_alert_run_dialog_for_args ((GtkWindow *) priv->main,
 				"org-gnome-exchange-operations:more-delegates-selected", NULL, NULL);
 			gtk_widget_grab_focus ((GtkWidget *) name_selector_entry);
 			options->delegate_address = NULL;
@@ -146,8 +146,8 @@ exchange_send_options_get_widgets_data (ExchangeSendOptionsDialog *sod)
 		}
 	}
 
-	options->importance = gtk_combo_box_get_active ((GtkComboBox *)priv->importance);
-	options->sensitivity = gtk_combo_box_get_active ((GtkComboBox *)priv->sensitivity);
+	options->importance = gtk_combo_box_get_active ((GtkComboBox *) priv->importance);
+	options->sensitivity = gtk_combo_box_get_active ((GtkComboBox *) priv->sensitivity);
 
 	options->send_as_del_enabled = gtk_toggle_button_get_active (
 					GTK_TOGGLE_BUTTON (priv->delegate_enabled));
@@ -183,14 +183,14 @@ exchange_send_options_fill_widgets_with_data (ExchangeSendOptionsDialog *sod)
 
 	if (options->send_as_del_enabled) {
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->delegate_enabled), TRUE);
-		gtk_widget_set_sensitive ((GtkWidget *)name_selector_entry, TRUE);
-		gtk_widget_set_sensitive ((GtkWidget *)priv->button_user, TRUE);
+		gtk_widget_set_sensitive ((GtkWidget *) name_selector_entry, TRUE);
+		gtk_widget_set_sensitive ((GtkWidget *) priv->button_user, TRUE);
 	}
 
 	else {
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->delegate_enabled), FALSE);
-		gtk_widget_set_sensitive ((GtkWidget *)name_selector_entry, FALSE);
-		gtk_widget_set_sensitive ((GtkWidget *)priv->button_user, FALSE);
+		gtk_widget_set_sensitive ((GtkWidget *) name_selector_entry, FALSE);
+		gtk_widget_set_sensitive ((GtkWidget *) priv->button_user, FALSE);
 	}
 
 	if (options->read_enabled)
@@ -555,7 +555,7 @@ exchange_sendoptions_dialog_init (ExchangeSendOptionsDialog *sod)
 static void
 exchange_sendoptions_dialog_finalize (GObject *object)
 {
-	ExchangeSendOptionsDialog *sod = (ExchangeSendOptionsDialog *)object;
+	ExchangeSendOptionsDialog *sod = (ExchangeSendOptionsDialog *) object;
 	ExchangeSendOptionsDialogPrivate *priv;
 
 	g_return_if_fail (EXCHANGE_IS_SENDOPTIONS_DIALOG (sod));
diff --git a/server/lib/e2k-autoconfig.c b/server/lib/e2k-autoconfig.c
index 4ff8215..6127093 100644
--- a/server/lib/e2k-autoconfig.c
+++ b/server/lib/e2k-autoconfig.c
@@ -810,7 +810,7 @@ find_global_catalog (E2kAutoconfig *ac)
 	if (len == -1)
 		return;
 
-	header = (HEADER *)answer;
+	header = (HEADER *) answer;
 	p = answer + sizeof (HEADER);
 	end = answer + len;
 
diff --git a/server/lib/e2k-context.c b/server/lib/e2k-context.c
index ab4cbcb..4c848c5 100644
--- a/server/lib/e2k-context.c
+++ b/server/lib/e2k-context.c
@@ -140,7 +140,7 @@ static void
 proxy_settings_changed (EProxy *proxy, gpointer user_data)
 {
 	SoupURI *proxy_uri = NULL;
-	E2kContext* ctx = (E2kContext *)user_data;
+	E2kContext* ctx = (E2kContext *) user_data;
 	if (!ctx || !ctx->priv ||
 	    (!ctx->priv->session && !ctx->priv->async_session) ||
 	    (!ctx->priv->owa_uri))
@@ -306,7 +306,7 @@ got_connection (SoupSocket *sock, guint status, gpointer user_data)
 	memset (&sin, 0, sizeof (sin));
 	sin.sin_family = AF_INET;
 
-	port = (gshort)getpid ();
+	port = (gshort) getpid ();
 	do {
 		port++;
 		if (port < 1024)
@@ -493,7 +493,7 @@ e2k_context_set_auth (E2kContext *ctx, const gchar *username,
 		return;
 
 	if (e2k_debug_level < 4)
-		level = (SoupLoggerLogLevel)e2k_debug_level;
+		level = (SoupLoggerLogLevel) e2k_debug_level;
 	else
 		level = SOUP_LOGGER_LOG_BODY;
 	logger = soup_logger_new (level, -1);
@@ -2363,7 +2363,7 @@ e2k_context_transfer_start (E2kContext *ctx, E2kOperation *op,
 	dest_uri = e2k_strdup_with_trailing_slash (dest_folder);
 	if (!dest_uri)
 		return NULL;
-	hrefs = (const gchar **)source_hrefs->pdata;
+	hrefs = (const gchar **) source_hrefs->pdata;
 
 	msgs = g_new0 (GSList *, 1);
 	for (i = 0; i < source_hrefs->len; i += E2K_CONTEXT_MAX_BATCH_SIZE) {
diff --git a/server/lib/e2k-freebusy.c b/server/lib/e2k-freebusy.c
index 29646de..1f5cdc6 100644
--- a/server/lib/e2k-freebusy.c
+++ b/server/lib/e2k-freebusy.c
@@ -446,7 +446,7 @@ static void
 add_events (GArray *events_array, E2kProperties *props,
 	    const gchar *month_list_prop, const gchar *data_list_prop)
 {
-	E2kFreebusyEvent *events = (E2kFreebusyEvent *)events_array->data;
+	E2kFreebusyEvent *events = (E2kFreebusyEvent *) events_array->data;
 	gint i, evt_start, evt_end, monthyear;
 	struct tm start_tm, end_tm;
 	time_t start, end;
diff --git a/server/lib/e2k-global-catalog.c b/server/lib/e2k-global-catalog.c
index 3a0d5bf..4b8d53a 100644
--- a/server/lib/e2k-global-catalog.c
+++ b/server/lib/e2k-global-catalog.c
@@ -206,7 +206,7 @@ gc_search (E2kGlobalCatalog *gc, E2kOperation *op,
 		if (ldap_error != LDAP_SUCCESS)
 			return ldap_error;
 		ldap_error = ldap_search_ext (gc->priv->ldap, base, scope,
-					      filter, (gchar **)attrs,
+					      filter, (gchar **) attrs,
 					      FALSE, NULL, NULL, NULL, 0,
 					      &msgid);
 		if (ldap_error == LDAP_SERVER_DOWN)
@@ -593,7 +593,7 @@ get_mail_values (E2kGlobalCatalog *gc, E2kOperation *op,
 	if (values && mtavalues) {
 		E2K_GC_DEBUG_MSG(("GC: mailNickname %s\n", values[0]));
 		E2K_GC_DEBUG_MSG(("GC: homeMTA %s\n", mtavalues[0]));
-		entry->exchange_server = (gchar *)lookup_mta (gc, op, mtavalues[0]);
+		entry->exchange_server = (gchar *) lookup_mta (gc, op, mtavalues[0]);
 		ldap_value_free (mtavalues);
 		if (entry->exchange_server)
 			entry->mailbox = g_strdup (values[0]);
@@ -815,7 +815,7 @@ e2k_global_catalog_lookup (E2kGlobalCatalog *gc,
 	}
 
 	ldap_error = gc_search (gc, op, base, scope, filter,
-				(const gchar **)attrs->pdata, &msg);
+				(const gchar **) attrs->pdata, &msg);
 	if (ldap_error == LDAP_USER_CANCELLED) {
 		E2K_GC_DEBUG_MSG(("GC: ldap_search cancelled"));
 		status = E2K_GLOBAL_CATALOG_CANCELLED;
@@ -1079,7 +1079,7 @@ lookup_passwd_max_age (E2kGlobalCatalog *gc, E2kOperation *op)
 		return -1;
 	}
 
-	ldap_error = ldap_search_ext (ldap, dn, LDAP_SCOPE_BASE, filter, (gchar **)attrs,
+	ldap_error = ldap_search_ext (ldap, dn, LDAP_SCOPE_BASE, filter, (gchar **) attrs,
 				      FALSE, NULL, NULL, NULL, 0, &msgid);
 	if (!ldap_error) {
 		ldap_error = gc_ldap_result (ldap, op, msgid, &msg);
@@ -1151,7 +1151,7 @@ do_delegate_op (E2kGlobalCatalog *gc, E2kOperation *op, gint deleg_op,
 	mod.mod_op = deleg_op;
 	mod.mod_type = (gchar *) "publicDelegates";
 	mod.mod_values = values;
-	values[0] = (gchar *)delegate_dn;
+	values[0] = (gchar *) delegate_dn;
 	values[1] = NULL;
 
 	mods[0] = &mod;
diff --git a/server/lib/e2k-http-utils.c b/server/lib/e2k-http-utils.c
index 791ba28..252fd13 100644
--- a/server/lib/e2k-http-utils.c
+++ b/server/lib/e2k-http-utils.c
@@ -52,7 +52,7 @@ e2k_http_parse_date (const gchar *date)
 		return -1;
 
 	memset (&tm, 0, sizeof (tm));
-	p = (gchar *)date + 5;
+	p = (gchar *) date + 5;
 
 	tm.tm_mday = strtol (p, &p, 10);
 	p++;
@@ -164,7 +164,7 @@ maybe_append_header (const gchar *header_name, const gchar *value, gpointer data
 	GetHeadersData *ghd = data;
 
 	if (!g_ascii_strcasecmp (header_name, ghd->wanted_header))
-		ghd->matches = g_slist_append (ghd->matches, (gchar *)value);
+		ghd->matches = g_slist_append (ghd->matches, (gchar *) value);
 }
 
 /* This is a cheat to recreate the behavior of libsoup 2.2's
diff --git a/server/lib/e2k-kerberos.c b/server/lib/e2k-kerberos.c
index c32176f..ce004d5 100644
--- a/server/lib/e2k-kerberos.c
+++ b/server/lib/e2k-kerberos.c
@@ -137,7 +137,7 @@ e2k_kerberos_change_password (const gchar *user, const gchar *domain,
 		return result;
 	}
 
-	result = krb5_change_password (ctx, &creds, (gchar *)new_password,
+	result = krb5_change_password (ctx, &creds, (gchar *) new_password,
 				       &res_code, &res_code_string, &res_string);
 	krb5_free_cred_contents (ctx, &creds);
 	krb5_free_data_contents (ctx, &res_code_string);
diff --git a/server/lib/e2k-properties.c b/server/lib/e2k-properties.c
index 44ddfa4..2b2c774 100644
--- a/server/lib/e2k-properties.c
+++ b/server/lib/e2k-properties.c
@@ -574,7 +574,7 @@ foreach_namespace_callback (gpointer key, gpointer value, gpointer data)
 	name = e2k_prop_namespace_name (pi->name);
 	if (!g_hash_table_lookup (fnd->seen_namespaces, name)) {
 		g_hash_table_insert (fnd->seen_namespaces,
-				     (gchar *)name, (gchar *)name);
+				     (gchar *) name, (gchar *) name);
 		fnd->callback (name, e2k_prop_namespace_abbrev (pi->name),
 			       fnd->user_data);
 	}
@@ -653,7 +653,7 @@ get_div (const gchar *propname)
 static gint
 prop_equal (gconstpointer v1, gconstpointer v2)
 {
-	const gchar *s1 = (const gchar *)v1, *s2 = (const gchar *)v2;
+	const gchar *s1 = (const gchar *) v1, *s2 = (const gchar *) v2;
 	const gchar *d1 = get_div (s1), *d2 = get_div (s2);
 
 	return (d1 - s1 == d2 - s2) && !g_ascii_strncasecmp (s1, s2, d1 - s1);
@@ -790,7 +790,7 @@ e2k_proptag_prop (guint32 proptag)
 	gchar *tmpname;
 
 	tmpname = g_strdup_printf (E2K_NS_MAPI_PROPTAG "x%08x",
-				   (unsigned)proptag);
+				   (unsigned) proptag);
 
 	pi = get_propinfo (tmpname, E2K_PROP_TYPE_UNKNOWN);
 	g_free (tmpname);
diff --git a/server/lib/e2k-restriction.c b/server/lib/e2k-restriction.c
index 41b3ff1..d165cac 100644
--- a/server/lib/e2k-restriction.c
+++ b/server/lib/e2k-restriction.c
@@ -102,7 +102,7 @@ conjoinv (E2kRestrictionType type, E2kRestriction *rn, va_list ap)
 
 	ret->type = type;
 	ret->res.and.nrns = rns->len;
-	ret->res.and.rns = (E2kRestriction **)rns->pdata;
+	ret->res.and.rns = (E2kRestriction **) rns->pdata;
 	g_ptr_array_free (rns, FALSE);
 
 	return ret;
@@ -658,7 +658,7 @@ rn_to_sql (E2kRestriction *rn, GString *sql, E2kRestrictionType inside)
 		case E2K_PROP_TYPE_DATE:
 			g_string_append_printf (sql,
 						"cast (\"%s\" as 'dateTime.tz')",
-						(gchar *)pv->value);
+						(gchar *) pv->value);
 			break;
 
 		default:
diff --git a/server/lib/e2k-result.c b/server/lib/e2k-result.c
index d7ceb31..738852d 100644
--- a/server/lib/e2k-result.c
+++ b/server/lib/e2k-result.c
@@ -363,7 +363,7 @@ void
 e2k_results_array_free (GArray *results_array, gboolean free_results)
 {
 	if (free_results) {
-		e2k_results_free ((E2kResult *)results_array->data,
+		e2k_results_free ((E2kResult *) results_array->data,
 				  results_array->len);
 	}
 	g_array_free (results_array, FALSE);
diff --git a/server/lib/e2k-rule-xml.c b/server/lib/e2k-rule-xml.c
index 4ccda13..519e92e 100644
--- a/server/lib/e2k-rule-xml.c
+++ b/server/lib/e2k-rule-xml.c
@@ -288,11 +288,11 @@ address_is (E2kRestriction *comment_rn, gboolean recipients, gboolean negated)
 
 	/* Extract the address part */
 	ba = pv->value;
-	p = strchr ((gchar *)ba->data, ':');
+	p = strchr ((gchar *) ba->data, ':');
 	if (p)
 		addr = g_ascii_strdown (p + 1, -1);
 	else
-		addr = g_ascii_strdown ((gchar *)ba->data, -1);
+		addr = g_ascii_strdown ((gchar *) ba->data, -1);
 
 	/* Find the display name in the comment */
 	display_name = NULL;
diff --git a/server/lib/e2k-rule.c b/server/lib/e2k-rule.c
index c025636..6c84048 100644
--- a/server/lib/e2k-rule.c
+++ b/server/lib/e2k-rule.c
@@ -503,7 +503,7 @@ e2k_rule_extract_propvalue (guint8 **ptr, gint *len, E2kPropValue *pv)
 		if (!e2k_rule_extract_byte (ptr, len, &temp))
 			return FALSE;
 		pv->type = E2K_PROP_TYPE_BOOL;
-		pv->value = GUINT_TO_POINTER ((guint)temp);
+		pv->value = GUINT_TO_POINTER ((guint) temp);
 		return TRUE;
 	}
 
diff --git a/server/lib/e2k-security-descriptor.c b/server/lib/e2k-security-descriptor.c
index 9697d44..e6885d8 100644
--- a/server/lib/e2k-security-descriptor.c
+++ b/server/lib/e2k-security-descriptor.c
@@ -336,7 +336,7 @@ extract_sids (E2kSecurityDescriptor *sd, xmlNodePtr node)
 			continue;
 		}
 
-		g_hash_table_insert (sd->priv->sids, (gchar *)bsid, sid);
+		g_hash_table_insert (sd->priv->sids, (gchar *) bsid, sid);
 	}
 }
 
@@ -465,7 +465,7 @@ e2k_security_descriptor_new (xmlNodePtr xml_form, GByteArray *binary_form)
 		e2k_sid_new_from_string_sid (E2K_SID_TYPE_WELL_KNOWN_GROUP,
 					     E2K_SID_WKS_EVERYONE, NULL);
 	g_hash_table_insert (sd->priv->sids,
-			     (gchar *)e2k_sid_get_binary_sid (sd->priv->default_sid),
+			     (gchar *) e2k_sid_get_binary_sid (sd->priv->default_sid),
 			     sd->priv->default_sid);
 	extract_sids (sd, xml_form);
 
@@ -508,7 +508,7 @@ e2k_security_descriptor_to_binary (E2kSecurityDescriptor *sd)
 
 	g_return_val_if_fail (E2K_IS_SECURITY_DESCRIPTOR (sd), NULL);
 
-	aces = (E2k_ACE *)sd->priv->aces->data;
+	aces = (E2k_ACE *) sd->priv->aces->data;
 
 	/* Compute the length of the ACL first */
 	acl_size = sizeof (E2k_ACL);
@@ -618,7 +618,7 @@ e2k_security_descriptor_get_sids (E2kSecurityDescriptor *sd)
 	g_return_val_if_fail (E2K_IS_SECURITY_DESCRIPTOR (sd), NULL);
 
 	added_sids = g_hash_table_new (NULL, NULL);
-	aces = (E2k_ACE *)sd->priv->aces->data;
+	aces = (E2k_ACE *) sd->priv->aces->data;
 	for (ace = 0; ace < sd->priv->aces->len; ace++) {
 		if (!g_hash_table_lookup (added_sids, aces[ace].Sid)) {
 			g_hash_table_insert (added_sids, aces[ace].Sid,
@@ -664,7 +664,7 @@ e2k_security_descriptor_remove_sid (E2kSecurityDescriptor *sd,
 	 * when sd is saved.
 	 */
 
-	aces = (E2k_ACE *)sd->priv->aces->data;
+	aces = (E2k_ACE *) sd->priv->aces->data;
 	for (ace = 0; ace < sd->priv->aces->len; ace++) {
 		if (aces[ace].Sid == sid)
 			aces[ace].Mask = 0;
@@ -700,7 +700,7 @@ e2k_security_descriptor_get_permissions (E2kSecurityDescriptor *sd,
 		return 0;
 
 	mapi_perms = 0;
-	aces = (E2k_ACE *)sd->priv->aces->data;
+	aces = (E2k_ACE *) sd->priv->aces->data;
 	for (ace = 0; ace < sd->priv->aces->len; ace++) {
 		if (aces[ace].Sid != sid)
 			continue;
@@ -731,7 +731,7 @@ e2k_security_descriptor_get_permissions (E2kSecurityDescriptor *sd,
 static void
 set_ace (E2kSecurityDescriptor *sd, E2k_ACE *ace)
 {
-	E2k_ACE *aces = (E2k_ACE *)sd->priv->aces->data;
+	E2k_ACE *aces = (E2k_ACE *) sd->priv->aces->data;
 	gint low, mid = 0, high, cmp = -1;
 
 	low = 0;
@@ -782,7 +782,7 @@ e2k_security_descriptor_set_permissions (E2kSecurityDescriptor *sd,
 	if (!sid2) {
 		gint size = g_hash_table_size (sd->priv->sid_order);
 
-		g_hash_table_insert (sd->priv->sids, (gchar *)bsid, sid);
+		g_hash_table_insert (sd->priv->sids, (gchar *) bsid, sid);
 		g_object_ref (sid);
 
 		g_hash_table_insert (sd->priv->sid_order, sid,
diff --git a/server/lib/e2k-sid.c b/server/lib/e2k-sid.c
index 53c8df6..e696a68 100644
--- a/server/lib/e2k-sid.c
+++ b/server/lib/e2k-sid.c
@@ -254,7 +254,7 @@ e2k_sid_get_binary_sid (E2kSid *sid)
 		}
 	}
 
-	return (guint8 *)sid->priv->binary_sid;
+	return (guint8 *) sid->priv->binary_sid;
 }
 
 /**
@@ -286,8 +286,8 @@ e2k_sid_get_display_name (E2kSid *sid)
 gint
 e2k_sid_binary_sid_equal (gconstpointer a, gconstpointer b)
 {
-	const guint8 *bsida = (const guint8 *)a;
-	const guint8 *bsidb = (const guint8 *)b;
+	const guint8 *bsida = (const guint8 *) a;
+	const guint8 *bsidb = (const guint8 *) b;
 
 	if (E2K_SID_BINARY_SID_LEN (bsida) !=
 	    E2K_SID_BINARY_SID_LEN (bsidb))
@@ -306,7 +306,7 @@ e2k_sid_binary_sid_equal (gconstpointer a, gconstpointer b)
 guint
 e2k_sid_binary_sid_hash (gconstpointer key)
 {
-	const guint8 *bsid = (const guint8 *)key;
+	const guint8 *bsid = (const guint8 *) key;
 	guint32 final_sa;
 
 	/* The majority of SIDs will differ only in the last
diff --git a/server/lib/e2k-uri.c b/server/lib/e2k-uri.c
index e46d78a..abe862e 100644
--- a/server/lib/e2k-uri.c
+++ b/server/lib/e2k-uri.c
@@ -227,7 +227,7 @@ e2k_uri_decode (gchar *part)
 {
 	guchar *s, *d;
 
-	s = d = (guchar *)part;
+	s = d = (guchar *) part;
 	while (*s) {
 		if (*s == '%') {
 			if (isxdigit (s[1]) && isxdigit (s[2])) {
@@ -279,7 +279,7 @@ void
 e2k_uri_append_encoded (GString *str, const gchar *in,
 			gboolean wss_encode, const gchar *extra_enc_chars)
 {
-	const guchar *s = (const guchar *)in;
+	const guchar *s = (const guchar *) in;
 
 	while (*s) {
 		if (extra_enc_chars && strchr (extra_enc_chars, *s))
diff --git a/server/lib/e2k-utils.c b/server/lib/e2k-utils.c
index 8971207..82a7923 100644
--- a/server/lib/e2k-utils.c
+++ b/server/lib/e2k-utils.c
@@ -191,7 +191,7 @@ e2k_filetime_to_time_t (guint64 filetime)
 guint64
 e2k_filetime_from_time_t (time_t tt)
 {
-	return (((guint64)tt) + ((guint64)SYSTIME_OFFSET) * 60) * 10000000;
+	return (((guint64) tt) + ((guint64) SYSTIME_OFFSET) * 60) * 10000000;
 }
 
 /**
@@ -295,9 +295,9 @@ e2k_entryid_to_dn (GByteArray *entryid)
 {
 	gchar *p;
 
-	p = ((gchar *)entryid->data) + entryid->len - 1;
+	p = ((gchar *) entryid->data) + entryid->len - 1;
 	if (*p == 0) {
-		while (*(p - 1) && p > (gchar *)entryid->data)
+		while (*(p - 1) && p > (gchar *) entryid->data)
 			p--;
 		if (*p == '/')
 			return p;
diff --git a/server/lib/ebrowse.c b/server/lib/ebrowse.c
index ce610cc..0cb2207 100644
--- a/server/lib/ebrowse.c
+++ b/server/lib/ebrowse.c
@@ -110,7 +110,7 @@ list_contents (E2kContext *ctx, gchar *top, gboolean reverse)
 	while ((result = e2k_result_iter_next (iter))) {
 		printf ("%3d %s (%s)\n", e2k_result_iter_get_index (iter),
 			result->href,
-			(gchar *)e2k_properties_get_prop (result->props,
+			(gchar *) e2k_properties_get_prop (result->props,
 							 E2K_PR_DAV_DISPLAY_NAME));
 	}
 	status = e2k_result_iter_free (iter);
@@ -124,7 +124,7 @@ static gint
 mp_compar (gconstpointer k, gconstpointer m)
 {
 	const gchar *key = k;
-	struct mapi_proptag *mp = (gpointer)m;
+	struct mapi_proptag *mp = (gpointer) m;
 
 	return strncmp (key, mp->proptag, 5);
 }
@@ -174,8 +174,8 @@ typedef struct {
 static gint
 prop_compar (gconstpointer a, gconstpointer b)
 {
-	EBrowseProp **pa = (gpointer)a;
-	EBrowseProp **pb = (gpointer)b;
+	EBrowseProp **pa = (gpointer) a;
+	EBrowseProp **pb = (gpointer) b;
 
 	return strcmp ((*pa)->propname, (*pb)->propname);
 }
@@ -429,7 +429,7 @@ get_sd (E2kContext *ctx, gchar *uri)
 		printf ("%s: %s (0x%lx)\n",
 			e2k_sid_get_display_name (sid),
 			e2k_permissions_role_get_name (role),
-			(gulong)perms);
+			(gulong) perms);
 	}
 	g_list_free (sids);
 
@@ -528,7 +528,7 @@ move (E2kContext *ctx, gchar *from, gchar *to, gboolean delete)
 			printf ("Failed: %d\n", result->status);
 		else {
 			printf ("moved to %s\n",
-				(gchar *)e2k_properties_get_prop (result->props,
+				(gchar *) e2k_properties_get_prop (result->props,
 								 E2K_PR_DAV_LOCATION));
 		}
 	}
diff --git a/server/storage/e-folder-exchange.c b/server/storage/e-folder-exchange.c
index a22f8e3..a14460e 100644
--- a/server/storage/e-folder-exchange.c
+++ b/server/storage/e-folder-exchange.c
@@ -166,7 +166,7 @@ e_folder_exchange_new (ExchangeHierarchy *hier, const gchar *name,
 		   name, type, internal_uri, physical_uri));
 
 	efe = g_object_new (E_TYPE_FOLDER_EXCHANGE, NULL);
-	ef = (EFolder *)efe;
+	ef = (EFolder *) efe;
 
 	e_folder_construct (ef, name, type, "");
 
@@ -445,7 +445,7 @@ e_folder_exchange_get_storage_file (EFolder *folder, const gchar *filename)
 
 	g_return_val_if_fail (E_IS_FOLDER_EXCHANGE (folder), NULL);
 
-	efe = (EFolderExchange *)folder;
+	efe = (EFolderExchange *) folder;
 
 	if (!efe->priv->storage_dir) {
 		efe->priv->storage_dir = e_path_to_physical (
diff --git a/server/storage/exchange-account.c b/server/storage/exchange-account.c
index f74899a..a5b4440 100644
--- a/server/storage/exchange-account.c
+++ b/server/storage/exchange-account.c
@@ -386,7 +386,7 @@ hierarchy_new_folder (ExchangeHierarchy *hier, EFolder *folder,
 					permanent_uri))) {
 		g_object_ref (folder);
 		g_hash_table_insert (account->priv->folders,
-				     (gchar *)permanent_uri,
+				     (gchar *) permanent_uri,
 				     folder);
 		table_updated = 1;
 	}
@@ -511,8 +511,8 @@ exchange_account_create_folder (ExchangeAccount *account,
 static gboolean
 check_if_sf (gpointer key, gpointer value, gpointer user_data)
 {
-	gchar *sf_href = (gchar *)value;
-	gchar *int_uri = (gchar *)user_data;
+	gchar *sf_href = (gchar *) value;
+	gchar *int_uri = (gchar *) user_data;
 
 	if (!strcmp (sf_href, int_uri))
 		return TRUE; /* Quit calling the callback */
@@ -538,7 +538,7 @@ exchange_account_remove_folder (ExchangeAccount *account, const gchar *path)
 	int_uri = e_folder_exchange_get_internal_uri (folder);
 
 	if (g_hash_table_find (account->priv->standard_uris,
-					check_if_sf, (gchar *)int_uri)) {
+					check_if_sf, (gchar *) int_uri)) {
 		return EXCHANGE_ACCOUNT_FOLDER_UNSUPPORTED_OPERATION;
 	}
 
@@ -614,7 +614,7 @@ static void
 setup_hierarchy_foreign (ExchangeAccount *account, ExchangeHierarchy *hier)
 {
 	g_hash_table_insert (account->priv->foreign_hierarchies,
-			     (gchar *)hier->owner_email, hier);
+			     (gchar *) hier->owner_email, hier);
 	setup_hierarchy (account, hier);
 }
 
@@ -795,7 +795,7 @@ exchange_account_open_folder (ExchangeAccount *account, const gchar *path)
 
 	exchange_account_is_offline (account, &mode);
 	if (mode == ONLINE_MODE && !account->priv->connected &&
-	    hier == (ExchangeHierarchy *)account->priv->hierarchies->pdata[0] &&
+	    hier == (ExchangeHierarchy *) account->priv->hierarchies->pdata[0] &&
 	    folder == hier->toplevel) {
 		/* The shell is asking us to open the personal folders
 		 * hierarchy, but we're already planning to do that
@@ -860,7 +860,7 @@ context_redirect (E2kContext *ctx, E2kHTTPStatus status,
 	g_hash_table_remove (account->priv->folders, old_uri);
 	e_folder_exchange_set_internal_uri (folder, new_uri);
 	g_hash_table_insert (account->priv->folders,
-			     (gchar *)e_folder_exchange_get_internal_uri (folder),
+			     (gchar *) e_folder_exchange_get_internal_uri (folder),
 			     folder);
 
 	g_static_rec_mutex_unlock (&account->priv->folders_lock);
@@ -871,7 +871,7 @@ set_sf_prop (const gchar *propname, E2kPropType type,
 	     gpointer phref, gpointer user_data)
 {
 	ExchangeAccount *account = user_data;
-	const gchar *href = (const gchar *)phref;
+	const gchar *href = (const gchar *) phref;
 	gchar *tmp;
 
 	propname = strrchr (propname, ':');
@@ -1964,8 +1964,8 @@ exchange_account_get_folder (ExchangeAccount *account,
 static gint
 folder_comparator (gconstpointer a, gconstpointer b)
 {
-	EFolder **fa = (EFolder **)a;
-	EFolder **fb = (EFolder **)b;
+	EFolder **fa = (EFolder **) a;
+	EFolder **fb = (EFolder **) b;
 
 	return strcmp (e_folder_exchange_get_path (*fa),
 		       e_folder_exchange_get_path (*fb));
diff --git a/server/storage/exchange-hierarchy-favorites.c b/server/storage/exchange-hierarchy-favorites.c
index f4cf5be..05753d8 100644
--- a/server/storage/exchange-hierarchy-favorites.c
+++ b/server/storage/exchange-hierarchy-favorites.c
@@ -96,7 +96,7 @@ E2K_MAKE_TYPE (exchange_hierarchy_favorites, ExchangeHierarchyFavorites, class_i
 static void
 add_hrefs (ExchangeHierarchy *hier, EFolder *folder, gpointer hrefs)
 {
-	g_ptr_array_add (hrefs, (gchar *)e2k_uri_path (e_folder_exchange_get_internal_uri (folder)));
+	g_ptr_array_add (hrefs, (gchar *) e2k_uri_path (e_folder_exchange_get_internal_uri (folder)));
 }
 
 static const gchar *shortcuts_props[] = {
@@ -324,7 +324,7 @@ exchange_hierarchy_favorites_new (ExchangeAccount *account,
 
 	hier = g_object_new (EXCHANGE_TYPE_HIERARCHY_FAVORITES, NULL);
 
-	hfav = (ExchangeHierarchyFavorites *)hier;
+	hfav = (ExchangeHierarchyFavorites *) hier;
 	hfav->priv->public_uri = g_strdup (public_uri);
 	hfav->priv->shortcuts_uri = e2k_uri_concat (home_uri, "NON_IPM_SUBTREE/Shortcuts");
 
diff --git a/server/storage/exchange-hierarchy-foreign.c b/server/storage/exchange-hierarchy-foreign.c
index 3b1d836..951da23 100644
--- a/server/storage/exchange-hierarchy-foreign.c
+++ b/server/storage/exchange-hierarchy-foreign.c
@@ -538,9 +538,9 @@ exchange_hierarchy_foreign_new (ExchangeAccount *account,
 	props = g_hash_table_new (g_str_hash, g_str_equal);
 	g_hash_table_insert (props, (gpointer) "name", (gchar *)hierarchy_name);
 	g_hash_table_insert (props, (gpointer) "physical_uri_prefix",
-			     (gchar *)physical_uri_prefix);
+			     (gchar *) physical_uri_prefix);
 	g_hash_table_insert (props, (gpointer) "internal_uri_prefix",
-			     (gchar *)internal_uri_prefix);
+			     (gchar *) internal_uri_prefix);
 	g_hash_table_insert (props, (gpointer) "owner_name", (gchar *)owner_name);
 	g_hash_table_insert (props, (gpointer) "owner_email", (gchar *)owner_email);
 	g_hash_table_insert (props, (gpointer) "source_uri", (gchar *)source_uri);
diff --git a/server/storage/exchange-hierarchy-somedav.c b/server/storage/exchange-hierarchy-somedav.c
index e9afc01..94d6253 100644
--- a/server/storage/exchange-hierarchy-somedav.c
+++ b/server/storage/exchange-hierarchy-somedav.c
@@ -150,7 +150,7 @@ scan_subtree (ExchangeHierarchy *hier, EFolder *folder, gint mode)
 	}
 
 	iter = e_folder_exchange_bpropfind_start (hier->toplevel, NULL,
-						  (const gchar **)hrefs->pdata,
+						  (const gchar **) hrefs->pdata,
 						  hrefs->len,
 						  folder_props,
 						  G_N_ELEMENTS (folder_props));
diff --git a/server/storage/exchange-hierarchy-webdav.c b/server/storage/exchange-hierarchy-webdav.c
index 4f2eb84..101f22f 100644
--- a/server/storage/exchange-hierarchy-webdav.c
+++ b/server/storage/exchange-hierarchy-webdav.c
@@ -190,11 +190,11 @@ hierarchy_new_folder (ExchangeHierarchy *hier, EFolder *folder,
 	server has identical folder names[ internal_uri ] for folders. Very much
 	possible in the case of favorite folders */
 	if (g_hash_table_lookup (EXCHANGE_HIERARCHY_WEBDAV (hier)->priv->folders_by_internal_path,
-				(gchar *)e2k_uri_path (internal_uri)))
+				(gchar *) e2k_uri_path (internal_uri)))
 		return;
 
 	g_hash_table_insert (EXCHANGE_HIERARCHY_WEBDAV (hier)->priv->folders_by_internal_path,
-			     (gchar *)e2k_uri_path (internal_uri), g_object_ref (folder));
+			     (gchar *) e2k_uri_path (internal_uri), g_object_ref (folder));
 
 	mf_path = e_folder_exchange_get_storage_file (folder, "connector-metadata.xml");
 	e_folder_exchange_save_to_file (folder, mf_path);
@@ -209,7 +209,7 @@ hierarchy_removed_folder (ExchangeHierarchy *hier, EFolder *folder,
 	gchar *mf_path;
 
 	g_hash_table_remove (EXCHANGE_HIERARCHY_WEBDAV (hier)->priv->folders_by_internal_path,
-			     (gchar *)e2k_uri_path (internal_uri));
+			     (gchar *) e2k_uri_path (internal_uri));
 
 	mf_path = e_folder_exchange_get_storage_file (folder, "connector-metadata.xml");
 	g_unlink (mf_path);
@@ -528,7 +528,7 @@ rescan (ExchangeHierarchy *hier)
 
 	g_object_ref (hier);
 	iter = e_folder_exchange_bpropfind_start (hier->toplevel, NULL,
-						  (const gchar **)hrefs->pdata,
+						  (const gchar **) hrefs->pdata,
 						  hrefs->len,
 						  rescan_props,
 						  G_N_ELEMENTS (rescan_props));
@@ -717,7 +717,7 @@ scan_subtree (ExchangeHierarchy *hier, EFolder *parent, gint mode)
 		folders = g_ptr_array_new ();
 		exchange_hierarchy_webdav_offline_scan_subtree (EXCHANGE_HIERARCHY (hier), add_folders, folders);
 		for (i = 0; i <folders->len; i++) {
-			exchange_hierarchy_new_folder (hier, (EFolder *)folders->pdata[i]);
+			exchange_hierarchy_new_folder (hier, (EFolder *) folders->pdata[i]);
 		}
 		return EXCHANGE_ACCOUNT_FOLDER_OK;
 	}
diff --git a/server/xntlm/xntlm-des.c b/server/xntlm/xntlm-des.c
index b965184..52ed354 100644
--- a/server/xntlm/xntlm-des.c
+++ b/server/xntlm/xntlm-des.c
@@ -177,14 +177,14 @@ xntlm_des (XNTLM_DES_KS ks, guchar block[8])
 	guint32 left,right,work;
 
 	/* Read input block and place in left/right in big-endian order */
-	left = ((guint32)block[0] << 24)
-	 | ((guint32)block[1] << 16)
-	 | ((guint32)block[2] << 8)
-	 | (guint32)block[3];
-	right = ((guint32)block[4] << 24)
-	 | ((guint32)block[5] << 16)
-	 | ((guint32)block[6] << 8)
-	 | (guint32)block[7];
+	left = ((guint32) block[0] << 24)
+	 | ((guint32) block[1] << 16)
+	 | ((guint32) block[2] << 8)
+	 | (guint32) block[3];
+	right = ((guint32) block[4] << 24)
+	 | ((guint32) block[5] << 16)
+	 | ((guint32) block[6] << 8)
+	 | (guint32) block[7];
 
 	/* Hoey's clever initial permutation algorithm, from Outerbridge
 	 * (see Schneier p 478)
@@ -334,13 +334,13 @@ xntlm_deskey (XNTLM_DES_KS k, const guchar *key, gint decrypt)
 			}
 		}
 		/* Now convert to packed odd/even interleaved form */
-		k[i][0] = ((guint32)ks[0] << 24)
-		 | ((guint32)ks[2] << 16)
-		 | ((guint32)ks[4] << 8)
-		 | ((guint32)ks[6]);
-		k[i][1] = ((guint32)ks[1] << 24)
-		 | ((guint32)ks[3] << 16)
-		 | ((guint32)ks[5] << 8)
-		 | ((guint32)ks[7]);
+		k[i][0] = ((guint32) ks[0] << 24)
+		 | ((guint32) ks[2] << 16)
+		 | ((guint32) ks[4] << 8)
+		 | ((guint32) ks[6]);
+		k[i][1] = ((guint32) ks[1] << 24)
+		 | ((guint32) ks[3] << 16)
+		 | ((guint32) ks[5] << 8)
+		 | ((guint32) ks[7]);
 	}
 }
diff --git a/server/xntlm/xntlm.c b/server/xntlm/xntlm.c
index 557a2fe..c56956a 100644
--- a/server/xntlm/xntlm.c
+++ b/server/xntlm/xntlm.c
@@ -105,7 +105,7 @@ gboolean
 xntlm_parse_challenge (gpointer challenge, gint len, gchar **nonce,
 		       gchar **nt_domain, gchar **w2k_domain)
 {
-	guchar *chall = (guchar *)challenge;
+	guchar *chall = (guchar *) challenge;
 	gint off, dlen, doff, type;
 
 	if (len < NTLM_CHALLENGE_BASE_SIZE)
diff --git a/tools/exchange-autoconfig-wizard.c b/tools/exchange-autoconfig-wizard.c
index ee8a8fb..5e0e600 100644
--- a/tools/exchange-autoconfig-wizard.c
+++ b/tools/exchange-autoconfig-wizard.c
@@ -562,10 +562,10 @@ autoconfig_gui_apply (ExchangeAutoconfigGUI *gui)
 	/* Check if any account is already configured, and throw an error if so */
 	/* NOTE: This condition check needs to be removed when we start
 	   supporting multiple accounts */
-	for (iter = e_list_get_iterator ((EList *)list);
+	for (iter = e_list_get_iterator ((EList *) list);
 	     e_iterator_is_valid (iter);
 	     e_iterator_next (iter)) {
-		account = (EAccount *)e_iterator_get (iter);
+		account = (EAccount *) e_iterator_get (iter);
 		if (account && (found = is_active_exchange_account (account))) {
 			autoconfig_notice (
 				gui->assistant, GTK_MESSAGE_ERROR,
diff --git a/tools/ximian-connector-setup.c b/tools/ximian-connector-setup.c
index 52f5a84..80b16ed 100644
--- a/tools/ximian-connector-setup.c
+++ b/tools/ximian-connector-setup.c
@@ -89,7 +89,7 @@ main (gint argc, gchar **argv)
 
 	g_type_init ();
 	g_thread_init (NULL);
-	gtk_init_with_args (&argc, &argv, NULL, NULL, (gchar *)GETTEXT_PACKAGE, &error);
+	gtk_init_with_args (&argc, &argv, NULL, NULL, (gchar *) GETTEXT_PACKAGE, &error);
 
 	if (error != NULL) {
 		g_printerr ("Failed initialize application, %s\n", error->message);



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