gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] branch master updated: fix use of uninit v


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: fix use of uninit vars
Date: Tue, 26 Sep 2017 12:31:57 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 8a488d5  fix use of uninit vars
8a488d5 is described below

commit 8a488d52700ee2d85e3f24e5b644911eb65644f8
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Sep 26 12:32:50 2017 +0200

    fix use of uninit vars
---
 src/backend/taler-merchant-httpd_pay.c | 38 +++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_pay.c 
b/src/backend/taler-merchant-httpd_pay.c
index ff1636d..600a9ac 100644
--- a/src/backend/taler-merchant-httpd_pay.c
+++ b/src/backend/taler-merchant-httpd_pay.c
@@ -383,7 +383,7 @@ abort_deposit (struct PayContext *pc)
 {
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Aborting pending /deposit operations\n");
-  for (unsigned int i;i<pc->coins_cnt;i++)
+  for (unsigned int i=0;i<pc->coins_cnt;i++)
   {
     struct DepositConfirmation *dci = &pc->dc[i];
 
@@ -686,7 +686,6 @@ process_pay_with_exchange (void *cls,
   struct TALER_Amount wire_fee_customer_contribution;
   const struct TALER_EXCHANGE_Keys *keys;
   enum GNUNET_DB_QueryStatus qs;
-  enum GNUNET_DB_QueryStatus qs_st;
 
   pc->fo = NULL;
   if (NULL == mh)
@@ -966,6 +965,7 @@ process_pay_with_exchange (void *cls,
   if (GNUNET_NO == pc->transaction_exists)
   {
     struct GNUNET_TIME_Absolute now;
+    enum GNUNET_DB_QueryStatus qs_st;
 
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Dealing with new transaction `%s'\n",
@@ -1020,24 +1020,24 @@ process_pay_with_exchange (void *cls,
                                                              "code", 
(json_int_t) TALER_EC_PAY_DB_STORE_TRANSACTION_ERROR,
                                                              "hint", "Merchant 
database error: hard error while storing transaction"));
     }
-  }
 
-  /**
-   * Break if we couldn't modify one, and only one line; this
-   * includes hard errors.
-   */
-  if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs_st)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected query status %d while storing /pay transaction!\n",
-                (int) qs_st);
-    resume_pay_with_response (pc,
-                              MHD_HTTP_INTERNAL_SERVER_ERROR,
-                              TMH_RESPONSE_make_json_pack ("{s:I, s:s}",
-                                                           "code", 
(json_int_t) TALER_EC_PAY_DB_STORE_TRANSACTION_ERROR,
-                                                           "hint", "Merchant 
database error: failed to store transaction"));
-    return;
-  }
+    /**
+     * Break if we couldn't modify one, and only one line; this
+     * includes hard errors.
+     */
+    if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs_st)
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "Unexpected query status %d while storing /pay 
transaction!\n",
+                  (int) qs_st);
+      resume_pay_with_response (pc,
+                                MHD_HTTP_INTERNAL_SERVER_ERROR,
+                                TMH_RESPONSE_make_json_pack ("{s:I, s:s}",
+                                                             "code", 
(json_int_t) TALER_EC_PAY_DB_STORE_TRANSACTION_ERROR,
+                                                             "hint", "Merchant 
database error: failed to store transaction"));
+      return;
+    }
+  } /* end of if (GNUNET_NO == pc->transaction_esists) */
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Found transaction data for proposal `%s' of merchant `%s', 
initiating deposits\n",

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



reply via email to

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