From 113f3891d13a15b87827a8b1b33508231a1409b7 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 1 Mar 2020 17:51:46 +0100 Subject: removing dead code, using more named constants, checking return values better --- src/auditor/taler-auditor-httpd.c | 2 +- src/auditor/taler-auditor.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/auditor') diff --git a/src/auditor/taler-auditor-httpd.c b/src/auditor/taler-auditor-httpd.c index 043d5b148..ff069f2aa 100644 --- a/src/auditor/taler-auditor-httpd.c +++ b/src/auditor/taler-auditor-httpd.c @@ -232,7 +232,7 @@ signal_loop (void) } if (EINTR == errno) { - ret = 2; + /* ignore, do the loop again */ continue; } switch (c) diff --git a/src/auditor/taler-auditor.c b/src/auditor/taler-auditor.c index d211bd94a..2d33987b3 100644 --- a/src/auditor/taler-auditor.c +++ b/src/auditor/taler-auditor.c @@ -772,7 +772,7 @@ get_denomination_info_by_hash (const struct GNUNET_HashCode *dh, NULL); if (qs <= 0) { - if (0 == qs) + if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Denomination %s not found\n", TALER_B2S (dh)); @@ -3774,10 +3774,10 @@ refresh_session_cb (void *cls, cc->qs = qs; return GNUNET_SYSERR; } - if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != - check_known_coin (coin_pub, - denom_pub, - amount_with_fee)) + qs = check_known_coin (coin_pub, + denom_pub, + amount_with_fee); + if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs) { GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs); cc->qs = qs; @@ -4152,10 +4152,10 @@ deposit_cb (void *cls, cc->qs = qs; return GNUNET_SYSERR; } - if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != - check_known_coin (coin_pub, - denom_pub, - amount_with_fee)) + qs = check_known_coin (coin_pub, + denom_pub, + amount_with_fee); + if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs) { GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs); cc->qs = qs; -- cgit v1.2.3