summaryrefslogtreecommitdiff
path: root/include/git2/errors.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-01-18 18:00:39 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2020-01-24 15:12:56 -0600
commitf78f6bd597bf0207a89d8defd4f0b9582830844c (patch)
treef9afaeb0c71b4f3e98f87a3ce1b812744f446713 /include/git2/errors.h
parent4b331f020e29bf04525773c058e5015242c71eb5 (diff)
downloadlibgit2-f78f6bd597bf0207a89d8defd4f0b9582830844c.tar.gz
error functions: return an int
Stop returning a void for functions, future-proofing them to allow them to fail.
Diffstat (limited to 'include/git2/errors.h')
-rw-r--r--include/git2/errors.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/git2/errors.h b/include/git2/errors.h
index 370b6ac49..5c85c4d6c 100644
--- a/include/git2/errors.h
+++ b/include/git2/errors.h
@@ -143,8 +143,9 @@ GIT_EXTERN(void) git_error_clear(void);
* @param error_class One of the `git_error_t` enum above describing the
* general subsystem that is responsible for the error.
* @param string The formatted error message to keep
+ * @return 0 on success or -1 on failure
*/
-GIT_EXTERN(void) git_error_set_str(int error_class, const char *string);
+GIT_EXTERN(int) git_error_set_str(int error_class, const char *string);
/**
* Set the error message to a special value for memory allocation failure.