From: Sven Trenkel Date: Wed, 9 Dec 2009 15:33:50 +0000 (+0100) Subject: Return EINVAL instead of 0 on error. X-Git-Tag: collectd-4.10.0~91 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8fdf425d52986a519c7d46e9a999bc7b993c7cff;p=collectd.git Return EINVAL instead of 0 on error. --- diff --git a/src/meta_data.c b/src/meta_data.c index 80b6dd1e..6a336c4b 100644 --- a/src/meta_data.c +++ b/src/meta_data.c @@ -245,7 +245,7 @@ int meta_data_type (meta_data_t *md, const char *key) /* {{{ */ meta_entry_t *e; if ((md == NULL) || (key == NULL)) - return 0; + return -EINVAL; pthread_mutex_lock (&md->lock); @@ -268,7 +268,7 @@ int meta_data_toc (meta_data_t *md, char ***toc) /* {{{ */ meta_entry_t *e; if ((md == NULL) || (toc == NULL)) - return -1; + return -EINVAL; pthread_mutex_lock (&md->lock);