gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] 122/277: fixed bool casts in plugin initialization


From: gnunet
Subject: [taler-merchant] 122/277: fixed bool casts in plugin initialization
Date: Sun, 05 Jul 2020 20:50:35 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

commit 39d2fb9ed2b1737fba10579dfddd08edae734edb
Author: Jonathan Buchanan <jonathan.russ.buchanan@gmail.com>
AuthorDate: Tue May 19 12:44:34 2020 -0400

    fixed bool casts in plugin initialization
---
 src/backenddb/plugin_merchantdb_postgres.c | 88 +++++++++++++++---------------
 1 file changed, 44 insertions(+), 44 deletions(-)

diff --git a/src/backenddb/plugin_merchantdb_postgres.c 
b/src/backenddb/plugin_merchantdb_postgres.c
index 5e247d2..cf0ed8a 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -4993,7 +4993,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time > $4"
                             "   AND"
-                            "    NOT BOOL($5)" /* unclaimed orders are never 
paid */
+                            "    NOT CAST($5 as BOOL)" /* unclaimed orders are 
never paid */
                             " ORDER BY order_serial ASC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5022,7 +5022,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
                             " FROM merchant_orders"
                             " WHERE merchant_orders.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5033,7 +5033,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time > $4"
                             "   AND"
-                            "    NOT BOOL ($6)"/* unclaimed orders are never 
refunded */
+                            "    NOT CAST($6 as BOOL)"/* unclaimed orders are 
never refunded */
                             " ORDER BY order_serial ASC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5041,7 +5041,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
                             " FROM merchant_contract_terms"
                             " WHERE merchant_contract_terms.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5065,8 +5065,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
-                            ",BOOL($6)" /* otherwise $6 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
+                            ",CAST($6 as BOOL)" /* otherwise $6 is unused and 
Postgres unhappy */
                             " FROM merchant_orders"
                             " WHERE merchant_orders.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5077,7 +5077,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time > $4"
                             "   AND"
-                            "    NOT BOOL ($7)" /* unclaimed orders are never 
wired */
+                            "    NOT CAST($7 as BOOL)" /* unclaimed orders are 
never wired */
                             " ORDER BY order_serial ASC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5085,8 +5085,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
-                            ",BOOL($6)" /* otherwise $6 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
+                            ",CAST($6 as BOOL)" /* otherwise $6 is unused and 
Postgres unhappy */
                             " FROM merchant_contract_terms"
                             " WHERE merchant_contract_terms.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5118,9 +5118,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time > $4"
                             "   AND"
-                            "    NOT BOOL($5)" /* unclaimed orders are never 
paid */
+                            "    NOT CAST($5 as BOOL)" /* unclaimed orders are 
never paid */
                             "   AND"
-                            "    NOT BOOL ($6)"/* unclaimed orders are never 
refunded */
+                            "    NOT CAST($6 as BOOL)"/* unclaimed orders are 
never refunded */
                             " ORDER BY order_serial ASC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5153,7 +5153,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($6)" /* otherwise $6 is unused and Postgres 
unhappy */
+                            ",CAST($6 as BOOL)" /* otherwise $6 is unused and 
Postgres unhappy */
                             " FROM merchant_orders"
                             " WHERE merchant_orders.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5164,9 +5164,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time > $4"
                             "   AND"
-                            "    NOT BOOL($5)" /* unclaimed orders are never 
paid */
+                            "    NOT CAST($5 as BOOL)" /* unclaimed orders are 
never paid */
                             "   AND"
-                            "    NOT BOOL ($7)" /* unclaimed orders are never 
wired */
+                            "    NOT CAST($7 as BOOL)" /* unclaimed orders are 
never wired */
                             " ORDER BY order_serial ASC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5174,7 +5174,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($6)" /* otherwise $6 is unused and Postgres 
unhappy */
+                            ",CAST($6 as BOOL)" /* otherwise $6 is unused and 
Postgres unhappy */
                             " FROM merchant_contract_terms"
                             " WHERE merchant_contract_terms.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5198,7 +5198,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
                             " FROM merchant_orders"
                             " WHERE merchant_orders.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5209,9 +5209,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time > $4"
                             "   AND"
-                            "    NOT BOOL ($6)"/* unclaimed orders are never 
refunded */
+                            "    NOT CAST($6 as BOOL)"/* unclaimed orders are 
never refunded */
                             "   AND"
-                            "    NOT BOOL ($7)" /* unclaimed orders are never 
wired */
+                            "    NOT CAST($7 as BOOL)" /* unclaimed orders are 
never wired */
                             " ORDER BY order_serial ASC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5219,7 +5219,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
                             " FROM merchant_contract_terms"
                             " WHERE merchant_contract_terms.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5255,11 +5255,11 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time > $4"
                             "   AND"
-                            "    NOT BOOL($5)" /* unclaimed orders are never 
paid */
+                            "    NOT CAST($5 as BOOL)" /* unclaimed orders are 
never paid */
                             "   AND"
-                            "    NOT BOOL ($6)"/* unclaimed orders are never 
refunded */
+                            "    NOT CAST($6 as BOOL)"/* unclaimed orders are 
never refunded */
                             "   AND"
-                            "    NOT BOOL ($7)" /* unclaimed orders are never 
wired */
+                            "    NOT CAST($7 as BOOL)" /* unclaimed orders are 
never wired */
                             " ORDER BY order_serial ASC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5339,7 +5339,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time < $4"
                             "   AND"
-                            "    NOT BOOL($5)" /* unclaimed orders are never 
paid */
+                            "    NOT CAST($5 as BOOL)" /* unclaimed orders are 
never paid */
                             " ORDER BY order_serial DESC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5368,7 +5368,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
                             " FROM merchant_orders"
                             " WHERE merchant_orders.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5379,7 +5379,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time < $4"
                             "   AND"
-                            "    NOT BOOL ($6)"/* unclaimed orders are never 
refunded */
+                            "    NOT CAST($6 as BOOL)"/* unclaimed orders are 
never refunded */
                             " ORDER BY order_serial DESC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5387,7 +5387,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
                             " FROM merchant_contract_terms"
                             " WHERE merchant_contract_terms.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5411,8 +5411,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
-                            ",BOOL($6)" /* otherwise $6 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
+                            ",CAST($6 as BOOL)" /* otherwise $6 is unused and 
Postgres unhappy */
                             " FROM merchant_orders"
                             " WHERE merchant_orders.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5423,7 +5423,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time < $4"
                             "   AND"
-                            "    NOT BOOL ($7)" /* unclaimed orders are never 
wired */
+                            "    NOT CAST($7 as BOOL)" /* unclaimed orders are 
never wired */
                             " ORDER BY order_serial DESC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5431,8 +5431,8 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
-                            ",BOOL($6)" /* otherwise $6 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
+                            ",CAST($6 as BOOL)" /* otherwise $6 is unused and 
Postgres unhappy */
                             " FROM merchant_contract_terms"
                             " WHERE merchant_contract_terms.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5464,9 +5464,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time < $4"
                             "   AND"
-                            "    NOT BOOL($5)" /* unclaimed orders are never 
paid */
+                            "    NOT CAST($5 as BOOL)" /* unclaimed orders are 
never paid */
                             "   AND"
-                            "    NOT BOOL ($6)"/* unclaimed orders are never 
refunded */
+                            "    NOT CAST($6 as BOOL)"/* unclaimed orders are 
never refunded */
                             " ORDER BY order_serial DESC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5499,7 +5499,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($6)" /* otherwise $6 is unused and Postgres 
unhappy */
+                            ",CAST($6 as BOOL)" /* otherwise $6 is unused and 
Postgres unhappy */
                             " FROM merchant_orders"
                             " WHERE merchant_orders.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5510,9 +5510,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time < $4"
                             "   AND"
-                            "    NOT BOOL($5)" /* unclaimed orders are never 
paid */
+                            "    NOT CAST($5 as BOOL)" /* unclaimed orders are 
never paid */
                             "   AND"
-                            "    NOT BOOL ($7)" /* unclaimed orders are never 
wired */
+                            "    NOT CAST($7 as BOOL)" /* unclaimed orders are 
never wired */
                             " ORDER BY order_serial DESC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5520,7 +5520,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($6)" /* otherwise $6 is unused and Postgres 
unhappy */
+                            ",CAST($6 as BOOL)" /* otherwise $6 is unused and 
Postgres unhappy */
                             " FROM merchant_contract_terms"
                             " WHERE merchant_contract_terms.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5544,7 +5544,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
                             " FROM merchant_orders"
                             " WHERE merchant_orders.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5555,9 +5555,9 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time < $4"
                             "   AND"
-                            "    NOT BOOL ($6)"/* unclaimed orders are never 
refunded */
+                            "    NOT CAST($6 as BOOL)"/* unclaimed orders are 
never refunded */
                             "   AND"
-                            "    NOT BOOL ($7)" /* unclaimed orders are never 
wired */
+                            "    NOT CAST($7 as BOOL)" /* unclaimed orders are 
never wired */
                             " ORDER BY order_serial DESC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */
@@ -5565,7 +5565,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             " order_id"
                             ",order_serial"
                             ",creation_time"
-                            ",BOOL($5)" /* otherwise $5 is unused and Postgres 
unhappy */
+                            ",CAST($5 as BOOL)" /* otherwise $5 is unused and 
Postgres unhappy */
                             " FROM merchant_contract_terms"
                             " WHERE merchant_contract_terms.merchant_serial="
                             "     (SELECT merchant_serial "
@@ -5601,11 +5601,11 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
                             "   AND"
                             "    creation_time < $4"
                             "   AND"
-                            "    NOT BOOL($5)" /* unclaimed orders are never 
paid */
+                            "    NOT CAST($5 as BOOL)" /* unclaimed orders are 
never paid */
                             "   AND"
-                            "    NOT BOOL ($6)"/* unclaimed orders are never 
refunded */
+                            "    NOT CAST($6 as BOOL)"/* unclaimed orders are 
never refunded */
                             "   AND"
-                            "    NOT BOOL ($7)" /* unclaimed orders are never 
wired */
+                            "    NOT CAST($7 as BOOL)" /* unclaimed orders are 
never wired */
                             " ORDER BY order_serial DESC"
                             " LIMIT $2)"
                             "UNION " /* union ensures elements are distinct! */

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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