gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r29272 - in gnunet/src: fs include


From: gnunet
Subject: [GNUnet-SVN] r29272 - in gnunet/src: fs include
Date: Sun, 15 Sep 2013 21:19:15 +0200

Author: grothoff
Date: 2013-09-15 21:19:15 +0200 (Sun, 15 Sep 2013)
New Revision: 29272

Modified:
   gnunet/src/fs/fs_sharetree.c
   gnunet/src/include/gnunet_container_lib.h
Log:
-minor style fixes

Modified: gnunet/src/fs/fs_sharetree.c
===================================================================
--- gnunet/src/fs/fs_sharetree.c        2013-09-15 19:18:51 UTC (rev 29271)
+++ gnunet/src/fs/fs_sharetree.c        2013-09-15 19:19:15 UTC (rev 29272)
@@ -198,7 +198,7 @@
  *        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 @@
 
   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;

Modified: gnunet/src/include/gnunet_container_lib.h
===================================================================
--- gnunet/src/include/gnunet_container_lib.h   2013-09-15 19:18:51 UTC (rev 
29271)
+++ gnunet/src/include/gnunet_container_lib.h   2013-09-15 19:19:15 UTC (rev 
29272)
@@ -398,7 +398,8 @@
  * 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 @@
                                     EXTRACTOR_MetaDataProcessor iter,
                                     void *iter_cls);
 
+
 /**
  * @ingroup metadata
  * Get the first MD entry of the given type.  Caller




reply via email to

[Prev in Thread] Current Thread [Next in Thread]