Add set_consume which always takes ownership

Freeing in error path is the common pattern with set_put().
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2013-04-24 00:25:04 -04:00
parent c79bb9e4e2
commit ef42202ac8
14 changed files with 40 additions and 59 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ static void test_struct(void) {
assert_se(r >= 0);
if (i % 4 == 0) {
r = set_put(s, t);
r = set_consume(s, t);
assert_se(r >= 0);
}
}