fix more leaks
[oweals/gnunet.git] / src / fs / fs_test_lib.c
index 0fc36e7acbfa792c9186a98c011b0076c8cbc974..925e36a8e5e93aec8b8f3f461134004077f98860 100644 (file)
@@ -183,16 +183,16 @@ struct TestDownloadOperation
  * @param tc scheduler context (unused)
  */
 static void
-report_uri (void *cls, 
+report_uri (void *cls,
            const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct TestPublishOperation *po = cls;
 
   GNUNET_FS_publish_stop (po->publish_context);
   GNUNET_TESTBED_operation_done (po->fs_op);
-  po->publish_cont (po->publish_cont_cls, 
+  po->publish_cont (po->publish_cont_cls,
                    po->publish_uri,
-                   (GNUNET_YES == po->do_index) 
+                   (GNUNET_YES == po->do_index)
                    ? po->publish_tmp_file
                    : NULL);
   GNUNET_FS_uri_destroy (po->publish_uri);
@@ -272,15 +272,15 @@ publish_progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
  * @param cls pointer to uint32_t with publishing seed
  * @param offset offset to generate data for
  * @param max maximum number of bytes to generate
- * @param buf where to write generated data 
+ * @param buf where to write generated data
  * @param emsg where to store error message (unused)
  * @return number of bytes written to buf
  */
 static size_t
-file_generator (void *cls, 
+file_generator (void *cls,
                uint64_t offset,
-               size_t max, 
-               void *buf, 
+               size_t max,
+               void *buf,
                char **emsg)
 {
   uint32_t *publish_seed = cls;
@@ -307,7 +307,7 @@ file_generator (void *cls,
 
 /**
  * Connect adapter for publishing operation.
- * 
+ *
  * @param cls the 'struct TestPublishOperation'
  * @param cfg configuration of the peer to connect to; will be available until
  *          GNUNET_TESTBED_operation_done() is called on the operation returned
@@ -319,7 +319,7 @@ publish_connect_adapter (void *cls,
                         const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
   struct TestPublishOperation *po = cls;
+
   return GNUNET_FS_start (cfg,
                          "fs-test-publish",
                          &publish_progress_cb, po,
@@ -330,11 +330,11 @@ publish_connect_adapter (void *cls,
 
 /**
  * Adapter function called to destroy connection to file-sharing service.
- * 
+ *
  * @param cls the 'struct GNUNET_FS_Handle'
  * @param op_result unused (different for publish/download!)
  */
-static void 
+static void
 fs_disconnect_adapter (void *cls,
                       void *op_result)
 {
@@ -412,8 +412,8 @@ publish_fs_connect_complete_cb (void *cls,
   else
   {
     fi = GNUNET_FS_file_information_create_from_reader (po->fs, po,
-                                                        po->size, 
-                                                       &file_generator, &po->publish_seed, 
+                                                        po->size,
+                                                       &file_generator, &po->publish_seed,
                                                        NULL, NULL,
                                                         po->do_index, &bo);
   }
@@ -557,7 +557,7 @@ download_progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
 
 /**
  * Connect adapter for download operation.
- * 
+ *
  * @param cls the 'struct TestDownloadOperation'
  * @param cfg configuration of the peer to connect to; will be available until
  *          GNUNET_TESTBED_operation_done() is called on the operation returned
@@ -569,7 +569,7 @@ download_connect_adapter (void *cls,
                         const struct GNUNET_CONFIGURATION_Handle *cfg)
 {
   struct TestPublishOperation *po = cls;
+
   return GNUNET_FS_start (cfg,
                          "fs-test-download",
                          &download_progress_cb, po,