(mem_iter): follow conversion and return NULL when we get to the end,

not ENOENT.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15740 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2005-07-25 20:27:07 +00:00
parent 2499c2dbca
commit 74ecd12db9

View File

@@ -114,8 +114,10 @@ mem_iter(hx509_certs certs,
unsigned long *iter = cursor;
struct mem_data *mem = data;
if (*iter >= mem->len)
return ENOENT;
if (*iter >= mem->len) {
*cert = NULL;
return 0;
}
*cert = hx509_cert_ref(mem->val[*iter]);
(*iter)++;