-minor style fixes
authorChristian Grothoff <christian@grothoff.org>
Sun, 15 Sep 2013 19:19:15 +0000 (19:19 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 15 Sep 2013 19:19:15 +0000 (19:19 +0000)
src/fs/fs_sharetree.c
src/include/gnunet_container_lib.h

index 2ea00d6638e74682ef6b91489c2c10e0b41171c7..954d450a7d3d3ccce3687e6700ad301d743ac0aa 100644 (file)
@@ -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;
index a808c52a6aacd2f793dbfb86bc0b6997357cfeea..ad7bb8cc0cca8ce8cffd5e8bdbf2f2dc2d1150cd 100644 (file)
@@ -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