diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-12-20 19:55:15 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2016-12-20 19:55:15 +0200 |
commit | 9f1d5ced7ae7ba2489e5c3908b846f1c3f30889f (patch) | |
tree | 16208132d34ce756821068ad28ad000ae3089369 /libmu_sieve | |
parent | 3b0dfa604bc0ff846020adefd7252dc7e27cadad (diff) | |
download | mailutils-9f1d5ced7ae7ba2489e5c3908b846f1c3f30889f.tar.gz mailutils-9f1d5ced7ae7ba2489e5c3908b846f1c3f30889f.tar.bz2 |
sieve: improve address tests
* libmu_sieve/tests.c (retrieve_address): Treat MU_ERR_EMPTY_ADDRESS
as MU_ERR_NOENT. This complements 678d93678
Diffstat (limited to 'libmu_sieve')
-rw-r--r-- | libmu_sieve/tests.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libmu_sieve/tests.c b/libmu_sieve/tests.c index 00612c13d..29864e7e6 100644 --- a/libmu_sieve/tests.c +++ b/libmu_sieve/tests.c @@ -71,8 +71,15 @@ retrieve_address (void *item, void *data, size_t idx, char **pval) return MU_ERR_NOENT; rc = mu_address_create (&ap->addr, val); free (val); - if (rc) - return rc; + switch (rc) + { + case MU_ERR_EMPTY_ADDRESS: + case MU_ERR_NOENT: + return MU_ERR_NOENT; + + default: + return rc; + } } rc = ap->aget (ap->addr, idx+1, pval); |