aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-15 19:19:15 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-15 19:19:15 +0000
commit3870566bc19708599a4ed6b6e8b0103bcc854932 (patch)
treee5c8a187897412dd4a4f005c17b13cd8569e9e2e /src
parent8b20ea06fdb75740cead194d5c6826b4233ec500 (diff)
downloadgnunet-3870566bc19708599a4ed6b6e8b0103bcc854932.tar.gz
gnunet-3870566bc19708599a4ed6b6e8b0103bcc854932.zip
-minor style fixes
Diffstat (limited to 'src')
-rw-r--r--src/fs/fs_sharetree.c6
-rw-r--r--src/include/gnunet_container_lib.h4
2 files changed, 6 insertions, 4 deletions
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)
198 * can be NULL (if mime-type is not known) 198 * can be NULL (if mime-type is not known)
199 * @param data actual meta-data found 199 * @param data actual meta-data found
200 * @param data_len number of bytes in data 200 * @param data_len number of bytes in data
201 * @return GNUNET_OK to continue extracting / iterating 201 * @return 0 to continue extracting / iterating
202 */ 202 */
203static int 203static int
204add_to_meta_counter (void *cls, const char *plugin_name, 204add_to_meta_counter (void *cls, const char *plugin_name,
@@ -211,9 +211,9 @@ add_to_meta_counter (void *cls, const char *plugin_name,
211 211
212 GNUNET_CRYPTO_hash (data, data_len, &key); 212 GNUNET_CRYPTO_hash (data, data_len, &key);
213 cnt = GNUNET_CONTAINER_multihashmap_get (map, &key); 213 cnt = GNUNET_CONTAINER_multihashmap_get (map, &key);
214 if (cnt == NULL) 214 if (NULL == cnt)
215 { 215 {
216 cnt = GNUNET_malloc (sizeof (struct MetaCounter)); 216 cnt = GNUNET_new (struct MetaCounter);
217 cnt->data = data; 217 cnt->data = data;
218 cnt->data_size = data_len; 218 cnt->data_size = data_len;
219 cnt->plugin_name = plugin_name; 219 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
398 * Iterate over MD entries. 398 * Iterate over MD entries.
399 * 399 *
400 * @param md metadata to inspect 400 * @param md metadata to inspect
401 * @param iter function to call on each entry 401 * @param iter function to call on each entry, return 0 to continue to iterate
402 * and 1 to abort iteration in this function (GNU libextractor API!)
402 * @param iter_cls closure for @a iter 403 * @param iter_cls closure for @a iter
403 * @return number of entries 404 * @return number of entries
404 */ 405 */
@@ -407,6 +408,7 @@ GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData *md,
407 EXTRACTOR_MetaDataProcessor iter, 408 EXTRACTOR_MetaDataProcessor iter,
408 void *iter_cls); 409 void *iter_cls);
409 410
411
410/** 412/**
411 * @ingroup metadata 413 * @ingroup metadata
412 * Get the first MD entry of the given type. Caller 414 * Get the first MD entry of the given type. Caller