[evolution-exchange] Coding style and whitespace cleanup.



commit 33194e2e0b78bfabc6dfb0147b0990bcedfa19ff
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Jan 30 17:28:14 2010 -0500

    Coding style and whitespace cleanup.

 addressbook/e-book-backend-exchange.c |    4 +-
 addressbook/e-book-backend-gal.c      |   38 ++++++++++++++++----------------
 addressbook/e-book-backend-gal.h      |    2 +-
 camel/camel-exchange-search.h         |    2 +-
 camel/camel-exchange-summary.h        |    2 +-
 server/lib/e2k-path.c                 |    2 +-
 server/storage/e-folder-tree.c        |    2 +-
 server/storage/e-storage.c            |    4 +-
 8 files changed, 28 insertions(+), 28 deletions(-)
---
diff --git a/addressbook/e-book-backend-exchange.c b/addressbook/e-book-backend-exchange.c
index 87bbb02..0e23676 100644
--- a/addressbook/e-book-backend-exchange.c
+++ b/addressbook/e-book-backend-exchange.c
@@ -2866,7 +2866,7 @@ e_book_backend_exchange_construct (EBookBackendExchange *backend)
 	g_return_val_if_fail (backend != NULL, FALSE);
 	g_return_val_if_fail (E_IS_BOOK_BACKEND_EXCHANGE (backend), FALSE);
 
-	if (! e_book_backend_construct (E_BOOK_BACKEND (backend)))
+	if (!e_book_backend_construct (E_BOOK_BACKEND (backend)))
 		return FALSE;
 
 	return TRUE;
@@ -2914,7 +2914,7 @@ e_book_backend_exchange_new (void)
 
 	backend = g_object_new (e_book_backend_exchange_get_type (), NULL);
 
-	if (! e_book_backend_exchange_construct (backend)) {
+	if (!e_book_backend_exchange_construct (backend)) {
 		g_object_unref (backend);
 
 		return NULL;
diff --git a/addressbook/e-book-backend-gal.c b/addressbook/e-book-backend-gal.c
index ce448bd..9eddc7e 100644
--- a/addressbook/e-book-backend-gal.c
+++ b/addressbook/e-book-backend-gal.c
@@ -1993,28 +1993,28 @@ tool_server_controls( LDAP *ld, LDAPControl *extra_c, gint count )
 	LDAPControl c[3], **ctrls;
 
 	ctrls = (LDAPControl**) malloc(sizeof(c) + (count+1)*sizeof(LDAPControl*));
-	if ( ctrls == NULL ) {
+	if (ctrls == NULL) {
 		fprintf( stderr, "No memory\n" );
 		exit( EXIT_FAILURE );
 	}
 
-	while ( count-- ) {
+	while (count--) {
 		ctrls[i++] = extra_c++;
 	}
 	ctrls[i] = NULL;
 
 	err = ldap_set_option( ld, LDAP_OPT_SERVER_CONTROLS, ctrls );
 
-	if ( err != LDAP_SUCCESS ) {
+	if (err != LDAP_SUCCESS) {
 		for ( j = 0; j < i; j++ ) {
-			if ( ctrls[j]->ldctl_iscritical ) crit = 1;
+			if (ctrls[j]->ldctl_iscritical) crit = 1;
 		}
 		fprintf( stderr, "Could not set %scontrols\n",
 			crit ? "critical " : "" );
 	}
 
 	free( ctrls );
-	if ( crit ) {
+	if (crit) {
 		exit( EXIT_FAILURE );
 	}
 }
@@ -2056,16 +2056,16 @@ parse_page_control(
 	rc = ldap_parse_result( ld, result,
 		&err, NULL, NULL, NULL, &ctrl, 0 );
 
-	if ( rc != LDAP_SUCCESS ) {
+	if (rc != LDAP_SUCCESS) {
 		ldap_perror(ld, "ldap_parse_result");
 		exit( EXIT_FAILURE );
 	}
 
-	if ( err != LDAP_SUCCESS ) {
+	if (err != LDAP_SUCCESS) {
 		fprintf( stderr, "Error: %s (%d)\n", ldap_err2string(err), err );
 	}
 
-	if ( ctrl ) {
+	if (ctrl) {
 		/* Parse the control value
 		 * searchResult ::= SEQUENCE {
 		 *		size	INTEGER (0..maxInt),
@@ -2075,7 +2075,7 @@ parse_page_control(
 		 */
 		ctrlp = *ctrl;
 		ber = ber_init( &ctrlp->ldctl_value );
-		if ( ber == NULL ) {
+		if (ber == NULL) {
 			fprintf( stderr, "Internal error.\n");
 			return EXIT_FAILURE;
 		}
@@ -2084,13 +2084,13 @@ parse_page_control(
 		ber_dupbv( cookie, &servercookie );
 		(void) ber_free( ber, 1 );
 
-		if ( tag == LBER_ERROR ) {
+		if (tag == LBER_ERROR) {
 			fprintf( stderr,
 				"Paged results response control could not be decoded.\n");
 			return EXIT_FAILURE;
 		}
 
-		if ( entriesLeft < 0 ) {
+		if (entriesLeft < 0) {
 			fprintf( stderr,
 				"Invalid entries estimate in paged results response.\n");
 			return EXIT_FAILURE;
@@ -2140,7 +2140,7 @@ static gint dosearch(
 		sctrls, cctrls, timeout, size /*LDAP_NO_LIMIT*/, &msgid );
 	g_mutex_unlock (bl->priv->ldap_lock);
 
-	if ( rc != LDAP_SUCCESS ) {
+	if (rc != LDAP_SUCCESS) {
 		return( rc );
 	}
 
@@ -2158,7 +2158,7 @@ static gint dosearch(
 			EContact *contact;
 			const gchar *uid;
 
-			switch ( ldap_msgtype( msg ) ) {
+			switch (ldap_msgtype( msg )) {
 			case LDAP_RES_SEARCH_ENTRY:
 				count ++;
 				g_mutex_unlock (bl->priv->ldap_lock);
@@ -2183,7 +2183,7 @@ static gint dosearch(
 				break;
 
 			case LDAP_RES_SEARCH_RESULT:
-				if ( pageSize != 0 ) {
+				if (pageSize != 0) {
 					/* we hold the lock already */
 					rc = parse_page_control (bl->priv->ldap, msg, &cookie);
 				}
@@ -2198,7 +2198,7 @@ static gint dosearch(
 	}
 	g_mutex_unlock (bl->priv->ldap_lock);
 
-	if ( rc == -1 ) {
+	if (rc == -1) {
 		g_mutex_lock (bl->priv->ldap_lock);
 		ldap_perror (bl->priv->ldap, "ldap_result");
 		g_mutex_unlock (bl->priv->ldap_lock);
@@ -2239,12 +2239,12 @@ getNextPage:
 	/*start iteration*/
 
 	i = 0;
-	if ( pagedResults ) {
+	if (pagedResults) {
 		if (( prber = ber_alloc_t(LBER_USE_DER)) == NULL ) {
 			return;
 		}
 		ber_printf( prber, "{iO}", pageSize, &cookie );
-		if ( ber_flatten2( prber, &c[i].ldctl_value, 0 ) == -1 ) {
+		if (ber_flatten2( prber, &c[i].ldctl_value, 0 ) == -1) {
 			return;
 		}
 		d(printf ("Setting parameters		\n"));
@@ -2270,7 +2270,7 @@ getNextPage:
 
 	/* loop to get the next set of entries */
 
-	if ( (pageSize !=0 ) && (morePagedResults != 0)) {
+	if ((pageSize !=0) && (morePagedResults != 0)) {
 		d(printf ("Start next iteration\n"));
 		goto getNextPage;
 	} else {
@@ -2423,7 +2423,7 @@ ber_flatten2( BerElement *ber, struct berval *bv, gint alloc )
 {
 	struct berval *tmp;
 
-	if ( ber_flatten( ber, &tmp) == -1 ) {
+	if (ber_flatten( ber, &tmp) == -1) {
 		return;
 	}
 	bv->bv_len = tmp->bv_len;
diff --git a/addressbook/e-book-backend-gal.h b/addressbook/e-book-backend-gal.h
index e074afe..cbfee0a 100644
--- a/addressbook/e-book-backend-gal.h
+++ b/addressbook/e-book-backend-gal.h
@@ -34,5 +34,5 @@ GType       e_book_backend_gal_get_type (void);
 #define E_IS_BOOK_BACKEND_GAL(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_BOOK_BACKEND_GAL))
 #define E_IS_BOOK_BACKEND_GAL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_BOOK_BACKEND_GAL))
 
-#endif /* ! __E_BOOK_BACKEND_GAL_H__ */
+#endif /* __E_BOOK_BACKEND_GAL_H__ */
 
diff --git a/camel/camel-exchange-search.h b/camel/camel-exchange-search.h
index e0cb877..f1bbd4c 100644
--- a/camel/camel-exchange-search.h
+++ b/camel/camel-exchange-search.h
@@ -29,4 +29,4 @@ struct _CamelExchangeSearchClass {
 CamelType          camel_exchange_search_get_type (void);
 CamelFolderSearch *camel_exchange_search_new      (void);
 
-#endif /* ! _CAMEL_EXCHANGE_SEARCH_H */
+#endif /* _CAMEL_EXCHANGE_SEARCH_H */
diff --git a/camel/camel-exchange-summary.h b/camel/camel-exchange-summary.h
index fc988d7..6ffdc69 100644
--- a/camel/camel-exchange-summary.h
+++ b/camel/camel-exchange-summary.h
@@ -53,5 +53,5 @@ guint32             camel_exchange_summary_get_article_num      (CamelFolderSumm
 void                camel_exchange_summary_set_article_num      (CamelFolderSummary *summary,
 								 guint32            high_article_num);
 
-#endif /* ! _CAMEL_EXCHANGE_SUMMARY_H */
+#endif /* _CAMEL_EXCHANGE_SUMMARY_H */
 
diff --git a/server/lib/e2k-path.c b/server/lib/e2k-path.c
index 188c905..7cfcbba 100644
--- a/server/lib/e2k-path.c
+++ b/server/lib/e2k-path.c
@@ -166,7 +166,7 @@ find_folders_recursive (const gchar *physical_path, const gchar *path,
 					     dirent);
 
 		if (g_stat (file_path, &file_stat) < 0 ||
-		    ! S_ISDIR (file_stat.st_mode)) {
+		    !S_ISDIR (file_stat.st_mode)) {
 			g_free (file_path);
 			continue;
 		}
diff --git a/server/storage/e-folder-tree.c b/server/storage/e-folder-tree.c
index 1fa2491..1725655 100644
--- a/server/storage/e-folder-tree.c
+++ b/server/storage/e-folder-tree.c
@@ -232,7 +232,7 @@ e_folder_tree_add (EFolderTree *folder_tree,
 	g_return_val_if_fail (g_path_is_absolute (path), FALSE);
 
 	/* Can only "add" a new root folder if the tree is empty */
-	if (! strcmp (path, "/")) {
+	if (!strcmp (path, "/")) {
 		folder = g_hash_table_lookup (folder_tree->path_to_folder, path);
 		if (folder) {
 			if (folder->subfolders) {
diff --git a/server/storage/e-storage.c b/server/storage/e-storage.c
index 8a201dc..8d79196 100644
--- a/server/storage/e-storage.c
+++ b/server/storage/e-storage.c
@@ -486,7 +486,7 @@ e_storage_async_open_folder (EStorage *storage,
 		return;
 	}
 
-	if (! e_folder_get_has_subfolders (folder)) {
+	if (!e_folder_get_has_subfolders (folder)) {
 		(* callback) (storage, E_STORAGE_OK, path, data);
 		return;
 	}
@@ -694,7 +694,7 @@ e_storage_new_folder (EStorage *storage,
 
 	priv = storage->priv;
 
-	if (! e_folder_tree_add (priv->folder_tree, path, e_folder))
+	if (!e_folder_tree_add (priv->folder_tree, path, e_folder))
 		return FALSE;
 
 	/* If this is the child of a folder that has a pseudo child,



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