diff options
author | David Robillard <d@drobilla.net> | 2011-04-30 17:41:11 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-30 17:41:11 +0000 |
commit | 3ef3583423f162dc1860523deed95fa215ff5c10 (patch) | |
tree | 7a0e1703a023a47a2f740c67da4b12066cc23c7e /src/env.c | |
parent | 6dba0dd5cf94285437d2a0808ee2dec971302058 (diff) | |
download | serd-3ef3583423f162dc1860523deed95fa215ff5c10.tar.gz serd-3ef3583423f162dc1860523deed95fa215ff5c10.tar.bz2 serd-3ef3583423f162dc1860523deed95fa215ff5c10.zip |
Use descriptive return codes instead of bool
git-svn-id: http://svn.drobilla.net/serd/trunk@154 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/env.c')
-rw-r--r-- | src/env.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -112,7 +112,7 @@ serd_env_qualify(const SerdEnv* env, } SERD_API -bool +SerdStatus serd_env_expand(const SerdEnv* env, const SerdNode* qname, SerdChunk* uri_prefix, @@ -120,7 +120,7 @@ serd_env_expand(const SerdEnv* env, { const uint8_t* const colon = memchr(qname->buf, ':', qname->n_bytes); if (!colon) { - return false; // Illegal qname + return SERD_ERR_BAD_ARG; // Illegal qname } const size_t name_len = colon - qname->buf; @@ -130,9 +130,9 @@ serd_env_expand(const SerdEnv* env, uri_prefix->len = prefix->uri.n_bytes - 1; uri_suffix->buf = colon + 1; uri_suffix->len = qname->n_bytes - (colon - qname->buf) - 2; - return true; + return SERD_SUCCESS; } - return false; + return SERD_ERR_NOT_FOUND; } SERD_API |