[libgda/LIBGDA_4.2] Small optimization
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda/LIBGDA_4.2] Small optimization
- Date: Wed, 14 Dec 2011 17:00:50 +0000 (UTC)
commit 1b996a7b122a22bebeebc19f73cf63d2effa9699
Author: Vivien Malerba <malerba gnome-db org>
Date: Tue Nov 22 08:30:35 2011 +0100
Small optimization
libgda/gda-connection.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libgda/gda-connection.c b/libgda/gda-connection.c
index 18863e0..f3fc4c8 100644
--- a/libgda/gda-connection.c
+++ b/libgda/gda-connection.c
@@ -2813,9 +2813,13 @@ make_col_types_array (va_list args)
gint max = 10;
gint col, lastidx = 0;
+ col = va_arg (args, gint);
+ if (col < 0)
+ return NULL;
+
types = g_new0 (GType, max + 1);
types [max] = G_TYPE_NONE;
- for (col = va_arg (args, gint); col >= 0; col = va_arg (args, gint)) {
+ for (; col >= 0; col = va_arg (args, gint)) {
if (col >= max) {
gint i;
types = g_renew (GType, types, col + 5 + 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]