[tracker/tracker-0.10] libtracker-common: Fix compiler warning



commit c3cc46f4b743674d2044900b236352a1e1caa8ae
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Jul 5 17:31:27 2011 +0200

    libtracker-common: Fix compiler warning

 src/libtracker-common/tracker-os-dependant-unix.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-common/tracker-os-dependant-unix.c b/src/libtracker-common/tracker-os-dependant-unix.c
index ff87ad4..1c1975c 100644
--- a/src/libtracker-common/tracker-os-dependant-unix.c
+++ b/src/libtracker-common/tracker-os-dependant-unix.c
@@ -241,22 +241,21 @@ get_memory_total (void)
 		            error ? error->message : "no error given");
 		g_clear_error (&error);
 	} else {
-		gchar *start, *end, *p;
+		const gchar *start;
+		gchar *p, *end;
 
 		start = "MemTotal:";
-		end = "kB";
 
 		p = strstr (contents, start);
 		if (p) {
 			p += strlen (start);
-			end = strstr (p, end);
+			end = strstr (p, "kB");
 
 			if (end) {
 				*end = '\0';
 				total = 1024 * atol (p);
 			}
 		}
-
 		g_free (contents);
 	}
 



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