[tracker/binary-log-2: 4/48] libtracker-db: Don't have tracker_db_journal_filename() AND get_filename() use one func



commit 4031c72a8329e841963e1230ac42fd440f57f883
Author: Martyn Russell <martyn lanedo com>
Date:   Mon Jan 4 14:09:54 2010 +0000

    libtracker-db: Don't have tracker_db_journal_filename() AND get_filename() use one func

 src/libtracker-db/tracker-db-journal.c |   28 ++++++++++++----------------
 1 files changed, 12 insertions(+), 16 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-journal.c b/src/libtracker-db/tracker-db-journal.c
index ea3115d..b8df12f 100644
--- a/src/libtracker-db/tracker-db-journal.c
+++ b/src/libtracker-db/tracker-db-journal.c
@@ -61,8 +61,14 @@ static guint cur_pos = 0;
 #define TRACKER_DB_JOURNAL_LOG_FILENAME  "tracker-store.journal"
 #define MIN_BLOCK_SIZE                   1024
 
-static void
-get_filename (void)
+gsize
+tracker_db_journal_get_size (void)
+{
+	return current_size;
+}
+
+const gchar *
+tracker_db_journal_filename (void)
 {
 	if (!filename) {
 		filename = g_build_filename (g_get_user_data_dir (),
@@ -71,18 +77,7 @@ get_filename (void)
 		                             TRACKER_DB_JOURNAL_LOG_FILENAME,
 		                             NULL);
 	}
-}
 
-gsize
-tracker_db_journal_get_size (void)
-{
-	return current_size;
-}
-
-const gchar*
-tracker_db_journal_filename (void)
-{
-	get_filename ();
 	return (const gchar *) filename;
 }
 
@@ -125,7 +120,7 @@ tracker_db_journal_open (const gchar *filen)
 	struct stat st;
 
 	if (!filen) {
-		get_filename ();
+		tracker_db_journal_filename ();
 	} else {
 		filename = g_strdup (filen);
 	}
@@ -358,7 +353,7 @@ void
 tracker_db_journal_reader_init (const gchar *filen)
 {
 	if (!filen) {
-		get_filename ();
+		tracker_db_journal_filename ();
 	} else {
 		filename = g_strdup (filen);
 	}
@@ -374,7 +369,8 @@ tracker_db_journal_reader_init (const gchar *filen)
 	journal_reader.current += 8;
 }
 
-static guint32 read_uint32 (const gchar *data)
+static
+guint32 read_uint32 (const gchar *data)
 {
 	return data[0] << 24 |
 	       data[1] << 16 |



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