[libgda] Another partial correction for bug #680639, thanks to Miguel Angel Cabrera



commit d31139d634e490ea6ab613909e68d9cd5e91a355
Author: Vivien Malerba <malerba gnome-db org>
Date:   Mon Jul 30 22:35:44 2012 +0200

    Another partial correction for bug #680639, thanks to Miguel Angel Cabrera

 libgda/sql-parser/gda-sql-parser.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libgda/sql-parser/gda-sql-parser.c b/libgda/sql-parser/gda-sql-parser.c
index 8393658..fade2b4 100644
--- a/libgda/sql-parser/gda-sql-parser.c
+++ b/libgda/sql-parser/gda-sql-parser.c
@@ -1541,8 +1541,10 @@ handle_composed_2_keywords (GdaSqlParser *parser, GValue *retval, gint second, g
 {
 	gint npushed, nmatched;
 	GValue *v = NULL;
+	gboolean match;
 	nmatched = fetch_forward (parser, &npushed, second, &v, 0);
-	if (nmatched == 1) {
+	match = (nmatched == 1);
+	if (match) {
 		gchar *newstr;
 		merge_tokenizer_contexts (parser, npushed);
 		parser->priv->context->token_type = replacer;
@@ -1550,13 +1552,12 @@ handle_composed_2_keywords (GdaSqlParser *parser, GValue *retval, gint second, g
 		newstr = g_strdup_printf ("%s %s", g_value_get_string (retval), g_value_get_string (v));
 		g_value_reset (retval);
 		g_value_take_string (retval, newstr);
-		return TRUE;
 	}
 	if (v) {
 		g_value_reset (v);
 		g_free (v);
 	}
-	return FALSE;
+	return match;
 }
 
 static GValue *



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