sieve: improve address tests
* libmu_sieve/tests.c (retrieve_address): Treat MU_ERR_EMPTY_ADDRESS as MU_ERR_NOENT. This complements 678d9367
Showing
1 changed file
with
9 additions
and
2 deletions
... | @@ -71,8 +71,15 @@ retrieve_address (void *item, void *data, size_t idx, char **pval) | ... | @@ -71,8 +71,15 @@ retrieve_address (void *item, void *data, size_t idx, char **pval) |
71 | return MU_ERR_NOENT; | 71 | return MU_ERR_NOENT; |
72 | rc = mu_address_create (&ap->addr, val); | 72 | rc = mu_address_create (&ap->addr, val); |
73 | free (val); | 73 | free (val); |
74 | if (rc) | 74 | switch (rc) |
75 | return rc; | 75 | { |
76 | case MU_ERR_EMPTY_ADDRESS: | ||
77 | case MU_ERR_NOENT: | ||
78 | return MU_ERR_NOENT; | ||
79 | |||
80 | default: | ||
81 | return rc; | ||
82 | } | ||
76 | } | 83 | } |
77 | 84 | ||
78 | rc = ap->aget (ap->addr, idx+1, pval); | 85 | rc = ap->aget (ap->addr, idx+1, pval); | ... | ... |
-
Please register or sign in to post a comment