diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-07-01 10:39:16 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-07-01 10:39:16 +0200 |
commit | 2d62dab74abfd76e5fe75f44b6c0dc9120a49b64 (patch) | |
tree | 3c539012aac7da238219ed232548ff3ceea7594d | |
parent | 0c577c77d84029093d676aa22c8cc662b7f3b124 (diff) | |
download | gnunet-2d62dab74abfd76e5fe75f44b6c0dc9120a49b64.tar.gz gnunet-2d62dab74abfd76e5fe75f44b6c0dc9120a49b64.zip |
-some coverity
-rw-r--r-- | src/namestore/plugin_rest_namestore.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c index ff5494dc7..0475960eb 100644 --- a/src/namestore/plugin_rest_namestore.c +++ b/src/namestore/plugin_rest_namestore.c | |||
@@ -640,16 +640,14 @@ namestore_get (struct GNUNET_REST_RequestHandle *con_handle, | |||
640 | handle->zone_pkey = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); | 640 | handle->zone_pkey = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego); |
641 | 641 | ||
642 | GNUNET_CRYPTO_hash ("record_type", strlen ("record_type"), &key); | 642 | GNUNET_CRYPTO_hash ("record_type", strlen ("record_type"), &key); |
643 | if (GNUNET_NO == | 643 | handle->record_type = GNUNET_GNSRECORD_TYPE_ANY; |
644 | if (GNUNET_YES == | ||
644 | GNUNET_CONTAINER_multihashmap_contains (con_handle->url_param_map, &key)) | 645 | GNUNET_CONTAINER_multihashmap_contains (con_handle->url_param_map, &key)) |
645 | { | 646 | { |
646 | handle->record_type = GNUNET_GNSRECORD_TYPE_ANY; | ||
647 | } | ||
648 | else | ||
649 | { | ||
650 | typename = GNUNET_CONTAINER_multihashmap_get (con_handle->url_param_map, | 647 | typename = GNUNET_CONTAINER_multihashmap_get (con_handle->url_param_map, |
651 | &key); | 648 | &key); |
652 | handle->record_type = GNUNET_GNSRECORD_typename_to_number (typename); | 649 | if (NULL != typename) |
650 | handle->record_type = GNUNET_GNSRECORD_typename_to_number (typename); | ||
653 | } | 651 | } |
654 | labelname = &egoname[strlen (ego_entry->identifier)]; | 652 | labelname = &egoname[strlen (ego_entry->identifier)]; |
655 | // set zone to name if given | 653 | // set zone to name if given |