[epiphany/gnome-3-22] history-service: Remove Yoda conditions
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/gnome-3-22] history-service: Remove Yoda conditions
- Date: Sun, 19 Feb 2017 16:40:32 +0000 (UTC)
commit 92885ae9a87bdd963eb56b378dae80db92e3c5da
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Feb 18 22:13:05 2017 -0600
history-service: Remove Yoda conditions
There's no excuse for this....
https://bugzilla.gnome.org/show_bug.cgi?id=778649
lib/history/ephy-history-service.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/lib/history/ephy-history-service.c b/lib/history/ephy-history-service.c
index 138a425..606507b 100644
--- a/lib/history/ephy-history-service.c
+++ b/lib/history/ephy-history-service.c
@@ -337,19 +337,19 @@ ephy_history_service_commit (EphyHistoryService *self)
GError *error = NULL;
g_assert (self->history_thread == g_thread_self ());
- if (NULL == self->history_database)
+ if (self->history_database == NULL)
return;
if (self->read_only)
return;
ephy_sqlite_connection_commit_transaction (self->history_database, &error);
- if (NULL != error) {
+ if (error != NULL) {
g_warning ("Could not commit idle history database transaction: %s", error->message);
g_error_free (error);
}
ephy_sqlite_connection_begin_transaction (self->history_database, &error);
- if (NULL != error) {
+ if (error != NULL) {
g_warning ("Could not start long-running history database transaction: %s", error->message);
g_error_free (error);
}
@@ -362,7 +362,7 @@ ephy_history_service_enable_foreign_keys (EphyHistoryService *self)
{
GError *error = NULL;
- if (NULL == self->history_database)
+ if (self->history_database == NULL)
return;
ephy_sqlite_connection_execute (self->history_database,
@@ -598,7 +598,7 @@ ephy_history_service_execute_add_visit_helper (EphyHistoryService *self, EphyHis
ephy_history_service_update_host_row (self, visit->url->host);
/* A NULL return here means that the URL does not yet exist in the database */
- if (NULL == ephy_history_service_get_url_row (self, visit->url->url, visit->url)) {
+ if (ephy_history_service_get_url_row (self, visit->url->url, visit->url) == NULL) {
visit->url->last_visit_time = visit->visit_time;
visit->url->visit_count = 1;
@@ -662,7 +662,7 @@ ephy_history_service_execute_find_visits (EphyHistoryService *self, EphyHistoryQ
/* FIXME: We don't have a good way to tell the difference between failures and empty returns */
while (current) {
EphyHistoryPageVisit *visit = (EphyHistoryPageVisit *)current->data;
- if (NULL == ephy_history_service_get_url_row (self, NULL, visit->url)) {
+ if (ephy_history_service_get_url_row (self, NULL, visit->url) == NULL) {
ephy_history_page_visit_list_free (visits);
g_warning ("Tried to process an orphaned page visit");
return FALSE;
@@ -835,7 +835,7 @@ ephy_history_service_execute_set_url_title (EphyHistoryService *self,
if (self->read_only)
return FALSE;
- if (NULL == ephy_history_service_get_url_row (self, NULL, url)) {
+ if (ephy_history_service_get_url_row (self, NULL, url) == NULL) {
/* The URL is not yet in the database, so we can't update it.. */
g_free (title);
return FALSE;
@@ -940,7 +940,7 @@ ephy_history_service_execute_set_url_hidden (EphyHistoryService *self,
hidden = url->hidden;
- if (NULL == ephy_history_service_get_url_row (self, NULL, url)) {
+ if (ephy_history_service_get_url_row (self, NULL, url) == NULL) {
/* The URL is not yet in the database, so we can't update it.. */
return FALSE;
} else {
@@ -986,7 +986,7 @@ ephy_history_service_execute_set_url_thumbnail_time (EphyHistoryService *self,
thumbnail_time = url->thumbnail_time;
- if (NULL == ephy_history_service_get_url_row (self, NULL, url))
+ if (ephy_history_service_get_url_row (self, NULL, url) == NULL)
return FALSE;
else {
url->thumbnail_time = thumbnail_time;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]