[tracker/error-handling: 3/10] libtracker-data: Remove unneeded out of memory check



commit 969ffebbc21a94b7ec968756cbfb0b833d5e1ac4
Author: Jürg Billeter <j bitron ch>
Date:   Tue May 17 14:58:58 2011 +0200

    libtracker-data: Remove unneeded out of memory check
    
    g_realloc never returns NULL (if size > 0). There is no point in trying
    to handle it in a single random place.

 src/libtracker-data/tracker-db-journal.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-journal.c b/src/libtracker-data/tracker-db-journal.c
index ad62125..bd4fbeb 100644
--- a/src/libtracker-data/tracker-db-journal.c
+++ b/src/libtracker-data/tracker-db-journal.c
@@ -478,14 +478,6 @@ db_journal_init_file (JournalWriter  *jwriter,
 
 		cur_block_maybe_expand (jwriter, 8);
 
-		/* If it didn't expand properly */
-		if (jwriter->cur_block == NULL) {
-			g_set_error (error, TRACKER_DB_JOURNAL_ERROR,
-			             TRACKER_DB_JOURNAL_ERROR_COULD_NOT_WRITE,
-			             "Could not write journal, not enough memory");
-			return FALSE;
-		}
-
 		jwriter->cur_block[0] = 't';
 		jwriter->cur_block[1] = 'r';
 		jwriter->cur_block[2] = 'l';



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