-add some more NULL checks

This commit is contained in:
Christian Grothoff 2021-10-27 09:21:53 +02:00
parent e6d55a77f9
commit 57c73fc166
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -949,7 +949,7 @@ notify_transaction (struct TALER_FAKEBANK_Handle *h,
* @return #GNUNET_YES if the transfer was successful, * @return #GNUNET_YES if the transfer was successful,
* #GNUNET_SYSERR if the request_uid was reused for a different transfer * #GNUNET_SYSERR if the request_uid was reused for a different transfer
*/ */
static int static enum GNUNET_GenericReturnValue
make_transfer ( make_transfer (
struct TALER_FAKEBANK_Handle *h, struct TALER_FAKEBANK_Handle *h,
const char *debit_account, const char *debit_account,
@ -968,6 +968,8 @@ make_transfer (
GNUNET_assert (0 == strcasecmp (amount->currency, GNUNET_assert (0 == strcasecmp (amount->currency,
h->currency)); h->currency));
GNUNET_assert (NULL != debit_account);
GNUNET_assert (NULL != credit_account);
GNUNET_break (0 != strncasecmp ("payto://", GNUNET_break (0 != strncasecmp ("payto://",
debit_account, debit_account,
strlen ("payto://"))); strlen ("payto://")));
@ -2307,8 +2309,9 @@ serve (struct TALER_FAKEBANK_Handle *h,
else if (0 == strcasecmp (method, else if (0 == strcasecmp (method,
MHD_HTTP_METHOD_POST)) MHD_HTTP_METHOD_POST))
{ {
if (0 == strcmp (url, if ( (0 == strcmp (url,
"/admin/add-incoming")) "/admin/add-incoming")) &&
(NULL != account) )
return handle_admin_add_incoming (h, return handle_admin_add_incoming (h,
connection, connection,
account, account,