[libgda] gda_sql_builder_select_join_targets(): Improve a warning.



commit 98b0dce137e599c30fa2ea9a1cf58d1a1049cc5b
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri May 21 16:13:49 2010 +0200

    gda_sql_builder_select_join_targets(): Improve a warning.

 libgda/gda-sql-builder.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/libgda/gda-sql-builder.c b/libgda/gda-sql-builder.c
index f11e591..b6ea565 100644
--- a/libgda/gda-sql-builder.c
+++ b/libgda/gda-sql-builder.c
@@ -1164,8 +1164,14 @@ gda_sql_builder_select_join_targets (GdaSqlBuilder *builder,
 		if ((left_pos != -1) && (right_pos != -1))
 			break;
 	}
-	if ((left_pos == -1) || (right_pos == -1)) {
-		g_warning (_("Unknown part ID %u"), (left_pos == -1) ? left_pos : right_pos);
+
+    if (left_pos == -1) {
+		g_warning (_("Unknown left part target ID %u"), left_target_id);
+		return 0;
+	}
+
+    if (right_pos == -1) {
+		g_warning (_("Unknown right part target ID %u"), right_target_id);
 		return 0;
 	}
 



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