[gnome-photos] indexing-notification: Style fix and simplify code
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] indexing-notification: Style fix and simplify code
- Date: Mon, 13 Nov 2017 18:17:19 +0000 (UTC)
commit 3dc9ff751725ea57d3c713a22c4234ab0c812c73
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Nov 13 19:10:58 2017 +0100
indexing-notification: Style fix and simplify code
Adopt the g_auto* rule of always initializing variables owned by the
scope for the sake of consistency, and g_slist_free_full is already
NULL-safe so drop the NULL check.
src/photos-indexing-notification.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/photos-indexing-notification.c b/src/photos-indexing-notification.c
index f24c29d..344d7a8 100644
--- a/src/photos-indexing-notification.c
+++ b/src/photos-indexing-notification.c
@@ -180,7 +180,7 @@ photos_indexing_notification_check_notification (PhotosIndexingNotification *sel
{
GApplication *app;
GList *miners_running;
- GSList *running;
+ GSList *running = NULL;
gboolean is_indexing_local = FALSE;
gboolean is_indexing_remote = FALSE;
@@ -213,8 +213,7 @@ photos_indexing_notification_check_notification (PhotosIndexingNotification *sel
else
photos_indexing_notification_destroy (self, FALSE);
- if (running != NULL)
- g_slist_free_full (running, g_free);
+ g_slist_free_full (running, g_free);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]