]> git.ozlabs.org Git - ccan/commit
strset: set errno to ENOENT even if we return NULL.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 1 Nov 2011 23:06:29 +0000 (09:36 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 1 Nov 2011 23:06:29 +0000 (09:36 +1030)
commit532cd74d55b89872211b34756d5ad59870dd012e
tree4f1a30d3e94d0cde5b8a52b166ad0e028fa271a0
parent8bb0697b44f0dc4168f72ee621a291d68fefd4ad
strset: set errno to ENOENT even if we return NULL.

It seems redundant: strset_test() and strset_clear() can only return NULL
when the string is not a member.  However, it became clear in writing
ccan/tsort that it's much more convenient for callers if we set errno
in this case too, so they can pass it up.
ccan/strset/strset.c
ccan/strset/strset.h
ccan/strset/test/run.c