gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] 02/06: reduce scope of local vars


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] 02/06: reduce scope of local vars
Date: Fri, 06 Oct 2017 22:02:24 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

commit a90936f85802679a7a69934b7c7820e095c2cb89
Author: Christian Grothoff <address@hidden>
AuthorDate: Fri Oct 6 21:35:17 2017 +0200

    reduce scope of local vars
---
 src/pq/test_pq.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/src/pq/test_pq.c b/src/pq/test_pq.c
index 841c3e3..6f7de0d 100644
--- a/src/pq/test_pq.c
+++ b/src/pq/test_pq.c
@@ -111,15 +111,6 @@ run_queries (PGconn *conn)
       TALER_PQ_query_param_json (json),
       GNUNET_PQ_query_param_end
     };
-    struct GNUNET_PQ_QueryParam params_select[] = {
-      GNUNET_PQ_query_param_end
-    };
-    struct GNUNET_PQ_ResultSpec results_select[] = {
-      TALER_PQ_result_spec_amount ("hamount", &hamount2),
-      TALER_PQ_result_spec_amount_nbo ("namount", &namount2),
-      TALER_PQ_result_spec_json ("json", &json2),
-      GNUNET_PQ_result_spec_end
-    };
 
     result = GNUNET_PQ_exec_prepared (conn,
                                      "test_insert",
@@ -132,8 +123,13 @@ run_queries (PGconn *conn)
       PQclear (result);
       return 1;
     }
-
     PQclear (result);
+  }
+  {
+    struct GNUNET_PQ_QueryParam params_select[] = {
+      GNUNET_PQ_query_param_end
+    };
+
     result = GNUNET_PQ_exec_prepared (conn,
                                      "test_select",
                                      params_select);
@@ -144,6 +140,16 @@ run_queries (PGconn *conn)
       PQclear (result);
       return 1;
     }
+  }
+
+  {
+    struct GNUNET_PQ_ResultSpec results_select[] = {
+      TALER_PQ_result_spec_amount ("hamount", &hamount2),
+      TALER_PQ_result_spec_amount_nbo ("namount", &namount2),
+      TALER_PQ_result_spec_json ("json", &json2),
+      GNUNET_PQ_result_spec_end
+    };
+
     ret = GNUNET_PQ_extract_result (result,
                                    results_select,
                                    0);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]