]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/set.h
basic/set: add set_ensure_put()
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 Jun 2020 12:25:18 +0000 (14:25 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 22 Jun 2020 14:32:37 +0000 (16:32 +0200)
commit0f9ccd95525c9869b6a23b71f6b7dbb2a7038674
treeaa9db2667955d7faaae6a65eb008ff2d2ab95045
parentaaffd349339ea3b016eea10a0daa63e892b2df7c
basic/set: add set_ensure_put()

It's such a common operation to allocate the set and put an item in it,
that it deserves a helper. set_ensure_put() has the same return values
as set_put().

Comes with tests!
src/basic/hashmap.c
src/basic/set.h
src/test/test-set.c