[tracker] libtracker-common: Fix compiler warning
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-common: Fix compiler warning
- Date: Tue, 5 Jul 2011 15:47:00 +0000 (UTC)
commit 45ee3ffea96dc5687adb7704ca5be3fe65158fd0
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]