make static analysis happy

This commit is contained in:
Christian Grothoff 2020-10-30 00:26:21 +01:00
parent 11627b38bb
commit afc72f1f47
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 5 additions and 3 deletions

@ -1 +1 @@
Subproject commit 32acd55e3d886322dab80bfbed4e73f590013472 Subproject commit 9d38f712c153727dbb895673d6d9841be57c12c9

View File

@ -2501,7 +2501,7 @@ TEH_handler_keys (const struct TEH_RequestHandler *rh,
GNUNET_break_op (0); GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection, return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST, MHD_HTTP_BAD_REQUEST,
TALER_EC_KEYS_HAVE_NOT_NUMERIC, TALER_EC_KEYS_HAVE_NOT_NUMERIC, // FIXME: use more GENERIC code!
have_cherrypick); have_cherrypick);
} }
/* The following multiplication may overflow; but this should not really /* The following multiplication may overflow; but this should not really
@ -2530,7 +2530,7 @@ TEH_handler_keys (const struct TEH_RequestHandler *rh,
GNUNET_break_op (0); GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection, return TALER_MHD_reply_with_error (connection,
MHD_HTTP_FORBIDDEN, MHD_HTTP_FORBIDDEN,
TALER_EC_KEYS_HAVE_NOT_NUMERIC, TALER_EC_KEYS_HAVE_NOT_NUMERIC, // FIXME: use more GENERIC code!
have_fakenow); have_fakenow);
} }
if (TEH_allow_keys_timetravel) if (TEH_allow_keys_timetravel)

View File

@ -50,6 +50,8 @@ TALER_language_matches (const char *language_pattern,
char *qp = strtok_r (NULL, ";", &sptr2); char *qp = strtok_r (NULL, ";", &sptr2);
double q = 1.0; double q = 1.0;
if (NULL == lp)
continue; /* should be impossible, but makes static analysis happy */
while (isspace ((int) *lp)) while (isspace ((int) *lp))
lp++; lp++;
if (NULL != qp) if (NULL != qp)