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
8 additions
and
1 deletions
... | @@ -71,9 +71,16 @@ retrieve_address (void *item, void *data, size_t idx, char **pval) | ... | @@ -71,9 +71,16 @@ 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 | { | ||
76 | case MU_ERR_EMPTY_ADDRESS: | ||
77 | case MU_ERR_NOENT: | ||
78 | return MU_ERR_NOENT; | ||
79 | |||
80 | default: | ||
75 | return rc; | 81 | return rc; |
76 | } | 82 | } |
83 | } | ||
77 | 84 | ||
78 | rc = ap->aget (ap->addr, idx+1, pval); | 85 | rc = ap->aget (ap->addr, idx+1, pval); |
79 | if (rc) | 86 | if (rc) | ... | ... |
-
Please register or sign in to post a comment