[tracker/harmattan-pre-signal-updates: 1345/1380] libtracker-bus, libtracker-client: Fixed offset calculation



commit 7b6002f86f63f81d052df7f2309f842d83318718
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Sep 16 10:32:47 2010 +0200

    libtracker-bus, libtracker-client: Fixed offset calculation

 src/libtracker-bus/tracker-bus-fd-cursor.c |    4 ++--
 src/libtracker-client/tracker.c            |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-bus/tracker-bus-fd-cursor.c b/src/libtracker-bus/tracker-bus-fd-cursor.c
index 96d4ab4..6f1c3bb 100644
--- a/src/libtracker-bus/tracker-bus-fd-cursor.c
+++ b/src/libtracker-bus/tracker-bus-fd-cursor.c
@@ -105,10 +105,10 @@ tracker_bus_fd_cursor_iter_next (TrackerBusFDCursor  *cursor,
 
 	/* Storage of ints that will be casted to TrackerSparqlValueType enums,
 	 * also see tracker_bus_fd_cursor_get_value_type */
-	cursor->types = (int*) cursor->buffer + cursor->buffer_index;
+	cursor->types = (int*) (cursor->buffer + cursor->buffer_index);
 	cursor->buffer_index += sizeof (int) * (cursor->n_columns);
 
-	cursor->offsets = (int*) cursor->buffer + cursor->buffer_index;
+	cursor->offsets = (int*) (cursor->buffer + cursor->buffer_index);
 	cursor->buffer_index += sizeof (int) * (cursor->n_columns - 1);
 	last_offset = buffer_read_int (cursor);
 
diff --git a/src/libtracker-client/tracker.c b/src/libtracker-client/tracker.c
index 283d8be..0048c4d 100644
--- a/src/libtracker-client/tracker.c
+++ b/src/libtracker-client/tracker.c
@@ -1828,10 +1828,10 @@ tracker_result_iterator_next (TrackerResultIterator *iterator)
 	 */
 	iterator->n_columns = iterator_buffer_read_int (iterator);
 
-	iterator->types = (int*) iterator->buffer + iterator->buffer_index;
+	iterator->types = (int*) (iterator->buffer + iterator->buffer_index);
 	iterator->buffer_index += sizeof (int) * (iterator->n_columns);
 
-	iterator->offsets = (int*) iterator->buffer + iterator->buffer_index;
+	iterator->offsets = (int*) (iterator->buffer + iterator->buffer_index);
 	iterator->buffer_index += sizeof (int) * (iterator->n_columns - 1);
 
 	last_offset = iterator_buffer_read_int (iterator);



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