[gnome-disk-utility] Trivial: no need to count the list twice
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility] Trivial: no need to count the list twice
- Date: Fri, 5 Nov 2010 15:46:05 +0000 (UTC)
commit bf43df5a991ea5f2753d25bc15f04cfda60b4d5e
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Nov 5 11:45:17 2010 -0400
Trivial: no need to count the list twice
Checking for a list being empty is as simple as == NULL.
src/notification/notification-main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/notification/notification-main.c b/src/notification/notification-main.c
index 71ec138..2975f7f 100644
--- a/src/notification/notification-main.c
+++ b/src/notification/notification-main.c
@@ -461,7 +461,7 @@ update_notification (NotificationData *data)
{
int num_drives;
- if (g_list_length (data->ata_smart_failures) == 0) {
+ if (data->ata_smart_failures == NULL) {
if (data->ata_smart_notification != NULL) {
notify_notification_close (data->ata_smart_notification, NULL);
g_object_unref (data->ata_smart_notification);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]