devhelp r1163 - in trunk: . src



Author: rhult
Date: Wed Oct  8 14:30:41 2008
New Revision: 1163
URL: http://svn.gnome.org/viewvc/devhelp?rev=1163&view=rev

Log:
2008-10-08  Richard Hult  <richard imendio com>

	* src/dh-parser.c: (dh_parser_read_file): Remove unnecessary
	checks.


Modified:
   trunk/ChangeLog
   trunk/src/dh-parser.c

Modified: trunk/src/dh-parser.c
==============================================================================
--- trunk/src/dh-parser.c	(original)
+++ trunk/src/dh-parser.c	Wed Oct  8 14:30:41 2008
@@ -516,13 +516,6 @@
 	gboolean    result = TRUE;
 
 	parser = g_new0 (DhParser, 1);
-	if (!parser) {
-		g_set_error (error,
-			     DH_ERROR,
-			     DH_ERROR_INTERNAL_ERROR,
-			     _("Could not create book parser"));
-		return FALSE;
-	}
 
 	if (g_str_has_suffix (path, ".devhelp2")) {
 		parser->version = 2;
@@ -541,14 +534,6 @@
         }
 
 	parser->m_parser = g_new0 (GMarkupParser, 1);
-	if (!parser->m_parser) {
-		g_free (parser);
-		g_set_error (error,
-			     DH_ERROR,
-			     DH_ERROR_INTERNAL_ERROR,
-			     _("Could not create markup parser"));
-		return FALSE;
-	}
 
 	parser->m_parser->start_element = parser_start_node_cb;
 	parser->m_parser->end_element = parser_end_node_cb;
@@ -557,11 +542,6 @@
 	parser->context = g_markup_parse_context_new (parser->m_parser, 0,
 						      parser, NULL);
 
-	parser->parent = NULL;
-
-	parser->parsing_keywords = FALSE;
-	parser->parsing_chapters = FALSE;
-
 	parser->path = path;
 	parser->book_tree = book_tree;
 	parser->keywords = keywords;



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