]> granicus.if.org Git - neomutt/commit
Do not rely on backends setting error codes on success
authorPietro Cerutti <gahr@gahr.ch>
Fri, 4 Aug 2017 07:36:06 +0000 (07:36 +0000)
committerRichard Russon <rich@flatcap.org>
Fri, 4 Aug 2017 11:00:07 +0000 (12:00 +0100)
commit1806e521dddb6b60fd6c939e86818b72c04c95ec
tree72c118fab47e8f7ec1edf53d3ff91ba33a040562
parent42d6addaaa599f02efee3bf1fb1d23b536c48164
Do not rely on backends setting error codes on success

From the API documentation of KyotoCabinet, TokyoCabinet and QDBM, I am
not convinced that the error code routines consistently return 0 whenever
the previous operation succeeded. Also, I am not convinced that they
return 1 whenever the previous operation failed.
It is important that we do not return 0 on failure, so let's try to get
the error code and fallback to -1 if we couldn't get anything more
specific.

Issue #696
hcache/kc.c
hcache/qdbm.c
hcache/tc.c