[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4830 - in GNUnet/src/util: containers crypto network_clien
From: |
gnunet |
Subject: |
[GNUnet-SVN] r4830 - in GNUnet/src/util: containers crypto network_client |
Date: |
Mon, 28 May 2007 12:55:58 -0600 (MDT) |
Author: grothoff
Date: 2007-05-28 12:55:58 -0600 (Mon, 28 May 2007)
New Revision: 4830
Modified:
GNUnet/src/util/containers/hashtabletest.c
GNUnet/src/util/containers/vectortest.c
GNUnet/src/util/crypto/hashperf.c
GNUnet/src/util/network_client/tcpiotest.c
Log:
minor cleanup
Modified: GNUnet/src/util/containers/hashtabletest.c
===================================================================
--- GNUnet/src/util/containers/hashtabletest.c 2007-05-28 18:55:47 UTC (rev
4829)
+++ GNUnet/src/util/containers/hashtabletest.c 2007-05-28 18:55:58 UTC (rev
4830)
@@ -41,6 +41,7 @@
HT_PUT(ht, "USA", "Washington") != YES)
{
puts("ht_put failed\n");
+ ht_destroy(ht);
return 1;
}
@@ -48,6 +49,7 @@
HT_CONTAINS_KEY(ht, "Iceland") != NO)
{
puts("ht_contains_key failed!\n");
+ ht_destroy(ht);
return 1;
}
@@ -55,18 +57,21 @@
HT_CONTAINS_VALUE(ht, "London") != NO)
{
puts("ht_contains_value failed!\n");
+ ht_destroy(ht);
return 1;
}
if (HT_GET(ht, "USA", &val, &vallen) != YES)
{
puts("ht_get failed!\n");
+ ht_destroy(ht);
return 1;
}
if (strcmp((char *) val, "Washington") != 0)
{
puts("ht_get result invalid!\n");
+ ht_destroy(ht);
return 1;
}
@@ -74,12 +79,14 @@
if (HT_CONTAINS_KEY(ht, "Spain") != NO)
{
puts("ht_remove failed!\n");
+ ht_destroy(ht);
return 1;
}
if (ht_size(ht) != 5)
{
puts("ht_size failed!\n");
+ ht_destroy(ht);
return 1;
}
@@ -87,6 +94,7 @@
if (ht_size(ht) != 0)
{
puts("ht_size#2 failed!\n");
+ ht_destroy(ht);
return 1;
}
Modified: GNUnet/src/util/containers/vectortest.c
===================================================================
--- GNUnet/src/util/containers/vectortest.c 2007-05-28 18:55:47 UTC (rev
4829)
+++ GNUnet/src/util/containers/vectortest.c 2007-05-28 18:55:58 UTC (rev
4830)
@@ -26,7 +26,7 @@
#include "gnunet_util_containers.h"
#include "platform.h"
-#define DUMP(v) fprintf(stderr, "At %d: \n", __LINE__); vectorDump(v);
+#define DUMP(v) fprintf(stderr, "At %d: \n", __LINE__); vectorDump(v);
vectorFree(v);
static int test(int size) {
struct Vector * v;
Modified: GNUnet/src/util/crypto/hashperf.c
===================================================================
--- GNUnet/src/util/crypto/hashperf.c 2007-05-28 18:55:47 UTC (rev 4829)
+++ GNUnet/src/util/crypto/hashperf.c 2007-05-28 18:55:58 UTC (rev 4830)
@@ -49,6 +49,7 @@
1024 * 64,
&hc3);
}
+ FREE(buf);
}
int main(int argc, char * argv[]) {
Modified: GNUnet/src/util/network_client/tcpiotest.c
===================================================================
--- GNUnet/src/util/network_client/tcpiotest.c 2007-05-28 18:55:47 UTC (rev
4829)
+++ GNUnet/src/util/network_client/tcpiotest.c 2007-05-28 18:55:58 UTC (rev
4830)
@@ -148,6 +148,7 @@
}
if (pos != i + sizeof(MESSAGE_HEADER)) {
FREE(buf);
+ FREE(hdr);
return 3;
}
if (0 != memcmp(buf, hdr, i+sizeof(MESSAGE_HEADER))) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4830 - in GNUnet/src/util: containers crypto network_client,
gnunet <=