From 7ad63f57b6ce7ae9e3cc19dcb441f0a4494fa3f2 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Wed, 15 Oct 2014 00:17:51 +0200 Subject: hashmap: allow hashmap_move() to fail It cannot fail in the current hashmap implementation, but it may fail in alternative implementations (unless a sufficiently large reservation has been placed beforehand). --- src/test/test-hashmap-plain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test') diff --git a/src/test/test-hashmap-plain.c b/src/test/test-hashmap-plain.c index 8f7c039e3d..ce686b650c 100644 --- a/src/test/test-hashmap-plain.c +++ b/src/test/test-hashmap-plain.c @@ -194,8 +194,8 @@ static void test_hashmap_move(void) { hashmap_put(m, "key 3", val3); hashmap_put(m, "key 4", val4); - hashmap_move(n, NULL); - hashmap_move(n, m); + assert(hashmap_move(n, NULL) == 0); + assert(hashmap_move(n, m) == 0); assert_se(hashmap_size(m) == 1); r = hashmap_get(m, "key 1"); -- cgit v1.2.3-54-g00ecf