summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schanzenbach <schanzen@gnunet.org>2022-07-01 10:39:16 +0200
committerMartin Schanzenbach <schanzen@gnunet.org>2022-07-01 10:39:16 +0200
commit2d62dab74abfd76e5fe75f44b6c0dc9120a49b64 (patch)
tree3c539012aac7da238219ed232548ff3ceea7594d /src
parent0c577c77d84029093d676aa22c8cc662b7f3b124 (diff)
-some coverity
Diffstat (limited to 'src')
-rw-r--r--src/namestore/plugin_rest_namestore.c10
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,
handle->zone_pkey = GNUNET_IDENTITY_ego_get_private_key (ego_entry->ego);
GNUNET_CRYPTO_hash ("record_type", strlen ("record_type"), &key);
- if (GNUNET_NO ==
+ handle->record_type = GNUNET_GNSRECORD_TYPE_ANY;
+ if (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_contains (con_handle->url_param_map, &key))
{
- handle->record_type = GNUNET_GNSRECORD_TYPE_ANY;
- }
- else
- {
typename = GNUNET_CONTAINER_multihashmap_get (con_handle->url_param_map,
&key);
- handle->record_type = GNUNET_GNSRECORD_typename_to_number (typename);
+ if (NULL != typename)
+ handle->record_type = GNUNET_GNSRECORD_typename_to_number (typename);
}
labelname = &egoname[strlen (ego_entry->identifier)];
// set zone to name if given