From: Christian Grothoff Date: Wed, 1 Sep 2010 12:23:18 +0000 (+0000) Subject: nitpicks X-Git-Tag: initial-import-from-subversion-38251~20491 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f6c3874040fbf6d3736577c12cd96aa3531ac175;p=oweals%2Fgnunet.git nitpicks --- diff --git a/src/dht/Makefile.am b/src/dht/Makefile.am index 86583ef22..7f75eea7f 100644 --- a/src/dht/Makefile.am +++ b/src/dht/Makefile.am @@ -44,7 +44,7 @@ libgnunet_plugin_dhtlog_dummy_la_LIBADD = \ $(XLIB) libgnunet_plugin_dhtlog_dummy_la_LDFLAGS = \ $(GN_PLUGIN_LDFLAGS) - + libgnunet_plugin_dhtlog_mysql_dump_la_SOURCES = \ plugin_dhtlog_mysql_dump.c libgnunet_plugin_dhtlog_mysql_dump_la_LIBADD = \ @@ -83,6 +83,7 @@ STUD_PROGS = gnunet-service-dht-can \ gnunet-service-dht-freenet \ gnunet-service-dht-kademlia \ gnunet-service-dht-koorde +STUD_TESTS = test_kademlia_end2end endif bin_PROGRAMS = $(STUD_PROGS) \ @@ -189,7 +190,7 @@ gnunet_dht_driver_LDADD = \ $(top_builddir)/src/util/libgnunetutil.la \ $(top_builddir)/src/dht/libgnunetdhtlog.la -check_PROGRAMS = \ +check_PROGRAMS = $(STUD_TESTS) \ test_dht_api \ test_dht_twopeer \ test_dht_twopeer_put_get \ @@ -238,6 +239,14 @@ test_dhtlog_LDADD = \ $(top_builddir)/src/dht/libgnunetdht.la \ $(top_builddir)/src/dht/libgnunetdhtlog.la +test_kademlia_end2end_SOURCES = \ + test_kademlia_end2end.c +test_kademlia_end2end_LDADD = \ + $(top_builddir)/src/util/libgnunetutil.la \ + $(top_builddir)/src/testing/libgnunettesting.la \ + $(top_builddir)/src/dht/libgnunetdht.la \ + $(top_builddir)/src/dht/libgnunetdhtlog.la + EXTRA_DIST = \ $(check_SCRIPTS) \ test_dht_api_data.conf \ diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 8703dc3b7..550b44c44 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -491,7 +491,7 @@ void *GNUNET_xmalloc_unchecked_ (size_t size, * memory is available. */ void *GNUNET_xrealloc_ (void *ptr, - const size_t n, const char *filename, int linenumber); + size_t n, const char *filename, int linenumber); /** * Free memory. Merely a wrapper for the case that we diff --git a/src/util/test_container_multihashmap.c b/src/util/test_container_multihashmap.c index 0c79d76bc..931a52fec 100644 --- a/src/util/test_container_multihashmap.c +++ b/src/util/test_container_multihashmap.c @@ -37,6 +37,7 @@ testMap (int i) struct GNUNET_CONTAINER_MultiHashMap *m; GNUNET_HashCode k1; GNUNET_HashCode k2; + const char *ret; int j; CHECK (NULL != (m = GNUNET_CONTAINER_multihashmap_create (i))); @@ -59,7 +60,9 @@ testMap (int i) "v1", GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE)); CHECK (1 == GNUNET_CONTAINER_multihashmap_size (m)); - CHECK (0 == strcmp ("v1", GNUNET_CONTAINER_multihashmap_get (m, &k1))); + ret = GNUNET_CONTAINER_multihashmap_get (m, &k1); + GNUNET_assert (ret != NULL); + CHECK (0 == strcmp ("v1", ret)); CHECK (GNUNET_NO == GNUNET_CONTAINER_multihashmap_put (m, &k1, "v1", diff --git a/src/util/test_strings.c b/src/util/test_strings.c index abd147300..c34c180fa 100644 --- a/src/util/test_strings.c +++ b/src/util/test_strings.c @@ -77,6 +77,7 @@ check () hdir, DIR_SEPARATOR_STR); b = GNUNET_STRINGS_filename_expand ("~"); + GNUNET_assert (b != NULL); WANT (buf, b); GNUNET_STRINGS_buffer_fill (buf, sizeof (buf), 3, "a", "btx", "c"); WANTB ("a\0btx\0c", buf, 8);