[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-exchange] branch master updated: eliminate useless g
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-exchange] branch master updated: eliminate useless global variable TFH_handle_history_range_step |
Date: |
Mon, 03 Jun 2019 00:25:14 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new f7255931 eliminate useless global variable
TFH_handle_history_range_step
f7255931 is described below
commit f7255931558bf788073af15b7e433680a10f218c
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jun 3 00:25:11 2019 +0200
eliminate useless global variable TFH_handle_history_range_step
---
src/bank-lib/fakebank.c | 3 +--
src/bank-lib/fakebank.h | 7 -------
src/bank-lib/fakebank_history.c | 16 ++++------------
3 files changed, 5 insertions(+), 21 deletions(-)
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index 71dd8bac..b6aee7f4 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -755,7 +755,6 @@ handle_history_range (struct TALER_FAKEBANK_Handle *h,
hrd.end.abs_value_us = end_stamp * 1000LL * 1000LL;
ha.range = &hrd;
- pos = NULL;
/* hunt for 'pos' in the Transaction(s) LL. */
for (pos = h->transactions_head;
NULL != pos;
@@ -768,7 +767,7 @@ handle_history_range (struct TALER_FAKEBANK_Handle *h,
pos,
&ha,
&TFH_handle_history_range_skip,
- TFH_handle_history_range_step,
+ &TFH_handle_history_range_skip,
&TFH_handle_history_range_advance);
}
diff --git a/src/bank-lib/fakebank.h b/src/bank-lib/fakebank.h
index f547db52..ff8ea716 100644
--- a/src/bank-lib/fakebank.h
+++ b/src/bank-lib/fakebank.h
@@ -312,11 +312,4 @@ struct Transaction *
TFH_handle_history_range_skip (const struct HistoryArgs *ha,
const struct Transaction *pos);
-/**
- * Iterates on the "next" element to be processed. To
- * be used when the current element _gets_ inserted in the result.
- * Same implementation of the "skip" counterpart, as /history-range
- * does not have the notion of count/delta.
- */
-Step TFH_handle_history_range_step;
#endif
diff --git a/src/bank-lib/fakebank_history.c b/src/bank-lib/fakebank_history.c
index 17960a4e..a3553b65 100644
--- a/src/bank-lib/fakebank_history.c
+++ b/src/bank-lib/fakebank_history.c
@@ -135,18 +135,11 @@ TFH_handle_history_range_skip (const struct HistoryArgs
*ha,
return pos->next;
}
-/**
- * Iterates on the "next" element to be processed. To
- * be used when the current element _gets_ inserted in the result.
- * Same implementation of the "skip" counterpart, as /history-range
- * does not have the notion of count/delta.
- */
-Step TFH_handle_history_range_step = &TFH_handle_history_range_skip;
/**
* Actual history response builder.
*
- * @param pos first (included) element in the result set.
+ * @param pos first (included) element in the result set, NULL if history is
empty
* @param ha history arguments.
* @param caller_name which function is building the history.
* @return MHD_YES / MHD_NO, after having enqueued the response
@@ -168,8 +161,9 @@ TFH_build_history_response (struct MHD_Connection
*connection,
json_t *jresponse;
int ret;
- while (advance (ha,
- pos))
+ while ( (NULL != pos) &&
+ advance (ha,
+ pos) )
{
json_t *trans;
char *subject;
@@ -423,5 +417,3 @@ TFH_parse_history_common_args (struct MHD_Connection
*connection,
return GNUNET_OK;
}
-
-
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-exchange] branch master updated: eliminate useless global variable TFH_handle_history_range_step,
gnunet <=