aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/plugin_rest_namestore.c
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2017-03-29 14:21:30 +0200
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2017-03-29 14:21:30 +0200
commit2b87f173e360aaf4a3bac3fbc6e5b4dc44cf58cd (patch)
treec39c08a3cbcdf13918856ff17216a4571be9b15a /src/namestore/plugin_rest_namestore.c
parentb95646624c640ac3f1ed74d5474b090f46af745c (diff)
downloadgnunet-2b87f173e360aaf4a3bac3fbc6e5b4dc44cf58cd.tar.gz
gnunet-2b87f173e360aaf4a3bac3fbc6e5b4dc44cf58cd.zip
-fix coverity
Diffstat (limited to 'src/namestore/plugin_rest_namestore.c')
-rw-r--r--src/namestore/plugin_rest_namestore.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c
index 0d36cf445..50957a5b4 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -899,10 +899,11 @@ namestore_zkey_cont (struct GNUNET_REST_RequestHandle *con,
899 } 899 }
900 handle->zkey_str = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map, 900 handle->zkey_str = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map,
901 &key); 901 &key);
902 if (GNUNET_OK != 902 if ((NULL == handle->zkey_str) ||
903 GNUNET_CRYPTO_ecdsa_public_key_from_string (handle->zkey_str, 903 (GNUNET_OK !=
904 GNUNET_CRYPTO_ecdsa_public_key_from_string (handle->zkey_str,
904 strlen (handle->zkey_str), 905 strlen (handle->zkey_str),
905 &pubkey)) 906 &pubkey)))
906 { 907 {
907 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 908 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
908 "Zkey invalid %s\n", handle->zkey_str); 909 "Zkey invalid %s\n", handle->zkey_str);
@@ -1126,8 +1127,8 @@ rest_identity_process_request(struct GNUNET_REST_RequestHandle *rest_handle,
1126 { 1127 {
1127 type = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map, 1128 type = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map,
1128 &key); 1129 &key);
1129 1130 if (NULL != type)
1130 handle->type = GNUNET_GNSRECORD_typename_to_number (type); 1131 handle->type = GNUNET_GNSRECORD_typename_to_number (type);
1131 } 1132 }
1132 name = get_name_from_url (handle->url); 1133 name = get_name_from_url (handle->url);
1133 if (NULL != ego) 1134 if (NULL != ego)