-avoid use after free
[oweals/gnunet.git] / src / conversation / test_conversation_api.c
index 7860eb794887e91a30ddb33e0a58bf1a4f920e70..101245c9e11a51b449c70f8ab1b2532ff49d63b9 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C)
+     (C) 2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
      Boston, MA 02111-1307, USA.
 */
 /**
- * @file src/test_conversation_api.c
+ * @file conversation/test_conversation_api.c
  * @brief testcase for conversation_api.c
  */
-#include <gnunet/platform.h>
-#include <gnunet/gnunet_util_lib.h>
+#include "platform.h"
+#include "gnunet_util_lib.h"
 #include "gnunet_conversation_service.h"
 
 
@@ -48,13 +48,14 @@ check ()
   };
   struct GNUNET_OS_Process *proc;
   char *path = GNUNET_OS_get_libexec_binary_path ( "gnunet-service-conversation");
+
   if (NULL == path)
   {
-               fprintf (stderr, "Service executable not found `%s'\n", "gnunet-service-conversation");
-               return;
+    fprintf (stderr, "Service executable not found `%s'\n", "gnunet-service-conversation");
+    return 0;
   }
   proc = GNUNET_OS_start_process (GNUNET_NO, GNUNET_OS_INHERIT_STD_ALL, NULL, NULL,
-                               path,
+                                  path,
                                  "gnunet-service-conversation",
                                  NULL);
 
@@ -76,7 +77,7 @@ check ()
 int
 main (int argc, char *argv[])
 {
-  GNUNET_log_setup ("test_conversation_api", 
+  GNUNET_log_setup ("test_conversation_api",
                    "WARNING",
                    NULL);
   return check ();