gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r27554 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r27554 - gnunet/src/util
Date: Tue, 25 Jun 2013 11:24:26 +0200

Author: grothoff
Date: 2013-06-25 11:24:26 +0200 (Tue, 25 Jun 2013)
New Revision: 27554

Modified:
   gnunet/src/util/test_mq.c
Log:
-cleanup leaky test code

Modified: gnunet/src/util/test_mq.c
===================================================================
--- gnunet/src/util/test_mq.c   2013-06-25 09:21:56 UTC (rev 27553)
+++ gnunet/src/util/test_mq.c   2013-06-25 09:24:26 UTC (rev 27554)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file set/test_mq.c
+ * @file util/test_mq.c
  * @brief simple tests for mq
  */
 #include "platform.h"
@@ -37,8 +37,9 @@
 
 GNUNET_NETWORK_STRUCT_END
 
-void
-test1 (void)
+
+static void
+test1 ()
 {
   struct GNUNET_MQ_Envelope *mqm;
   struct MyMessage *mm;
@@ -54,8 +55,8 @@
 }
 
 
-void
-test2 (void)
+static void
+test2 ()
 {
   struct GNUNET_MQ_Envelope *mqm;
   struct GNUNET_MessageHeader *mh;
@@ -68,17 +69,16 @@
   mqm = GNUNET_MQ_msg_header_extra (mh, 20, 42);
   GNUNET_assert (42 == ntohs (mh->type));
   GNUNET_assert (sizeof (struct GNUNET_MessageHeader) + 20 == ntohs 
(mh->size));
+  GNUNET_MQ_discard (mqm);
 }
 
 
 int
 main (int argc, char **argv)
 {
-
   GNUNET_log_setup ("test-mq", "INFO", NULL);
   test1 ();
   test2 ();
-
   return 0;
 }
 




reply via email to

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