[tracker] libtracker-data: Coding style
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-data: Coding style
- Date: Tue, 12 Oct 2010 15:15:26 +0000 (UTC)
commit 908c78407e4eee85deb2c957808000b1d6ac3a25
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Oct 12 17:03:00 2010 +0200
libtracker-data: Coding style
src/libtracker-data/tracker-db-interface-sqlite.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c b/src/libtracker-data/tracker-db-interface-sqlite.c
index bb6998a..de7089f 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -38,6 +38,8 @@
#include "tracker-db-interface-sqlite.h"
+#define UNKNOWN_STATUS 0.5
+
typedef struct {
TrackerDBStatement *head;
TrackerDBStatement *tail;
@@ -517,7 +519,7 @@ check_interrupt (void *user_data)
if (db_interface->busy_callback) {
db_interface->busy_callback (db_interface->busy_status,
- 0.5, /* No idea to get the status from SQLite */
+ UNKNOWN_STATUS, /* No idea to get the status from SQLite */
db_interface->busy_user_data);
}
@@ -855,10 +857,11 @@ tracker_db_interface_set_max_stmt_cache_size (TrackerDBInterface *db_int
}
/* Must be larger than 2 to make sense (to have a tail and head) */
- if (max_size > 2)
+ if (max_size > 2) {
stmt_lru->max = max_size;
- else
+ } else {
stmt_lru->max = 3;
+ }
}
void
@@ -871,10 +874,12 @@ tracker_db_interface_set_busy_handler (TrackerDBInterface *db_interface,
db_interface->busy_callback = busy_callback;
db_interface->busy_user_data = busy_user_data;
g_free (db_interface->busy_status);
- if (busy_status)
+
+ if (busy_status) {
db_interface->busy_status = g_strdup (busy_status);
- else
+ } else {
db_interface->busy_status = NULL;
+ }
}
TrackerDBStatement *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]