From: Christian Grothoff Date: Sun, 15 Sep 2013 19:19:15 +0000 (+0000) Subject: -minor style fixes X-Git-Tag: initial-import-from-subversion-38251~7333 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3870566bc19708599a4ed6b6e8b0103bcc854932;p=oweals%2Fgnunet.git -minor style fixes --- diff --git a/src/fs/fs_sharetree.c b/src/fs/fs_sharetree.c index 2ea00d663..954d450a7 100644 --- a/src/fs/fs_sharetree.c +++ b/src/fs/fs_sharetree.c @@ -198,7 +198,7 @@ add_to_keyword_counter (void *cls, const char *keyword, int is_mandatory) * can be NULL (if mime-type is not known) * @param data actual meta-data found * @param data_len number of bytes in data - * @return GNUNET_OK to continue extracting / iterating + * @return 0 to continue extracting / iterating */ static int add_to_meta_counter (void *cls, const char *plugin_name, @@ -211,9 +211,9 @@ add_to_meta_counter (void *cls, const char *plugin_name, GNUNET_CRYPTO_hash (data, data_len, &key); cnt = GNUNET_CONTAINER_multihashmap_get (map, &key); - if (cnt == NULL) + if (NULL == cnt) { - cnt = GNUNET_malloc (sizeof (struct MetaCounter)); + cnt = GNUNET_new (struct MetaCounter); cnt->data = data; cnt->data_size = data_len; cnt->plugin_name = plugin_name; diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index a808c52a6..ad7bb8cc0 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h @@ -398,7 +398,8 @@ GNUNET_CONTAINER_meta_data_add_publication_date (struct * Iterate over MD entries. * * @param md metadata to inspect - * @param iter function to call on each entry + * @param iter function to call on each entry, return 0 to continue to iterate + * and 1 to abort iteration in this function (GNU libextractor API!) * @param iter_cls closure for @a iter * @return number of entries */ @@ -407,6 +408,7 @@ GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData *md, EXTRACTOR_MetaDataProcessor iter, void *iter_cls); + /** * @ingroup metadata * Get the first MD entry of the given type. Caller