[tracker/miner-web-review: 20/74] libtracker-miner: Small optimization



commit b4474856a4e99b1f3ef92d80c4ed104970f4e121
Author: Philip Van Hoof <philip codeminded be>
Date:   Wed Feb 24 15:15:51 2010 +0100

    libtracker-miner: Small optimization

 src/libtracker-miner/tracker-storage.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-storage.c b/src/libtracker-miner/tracker-storage.c
index e7e1803..c086d59 100644
--- a/src/libtracker-miner/tracker-storage.c
+++ b/src/libtracker-miner/tracker-storage.c
@@ -414,7 +414,7 @@ drives_setup (TrackerStorage *storage)
 		g_debug ("Drive:'%s' found with %d %s:",
 		         g_drive_get_name (drive),
 		         g_list_length (volumes),
-		         g_list_length (volumes) == 1 ? "volume" : "volumes");
+		         (volumes && !volumes->next) ? "volume" : "volumes");
 
 		for (lv = volumes; lv; lv = lv->next) {
 			volume_add (storage, lv->data, TRUE);



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