diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2020-12-08 19:28:44 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2023-05-13 14:09:25 +0100 |
commit | 4f76ef568d74c63031eb42fc10bf08b5641e5f0b (patch) | |
tree | 7b96d7c1bdf5508c40c22d7517e17da1fe779418 /include | |
parent | ce488be46e4cd2aeeb69c39a062fae1ba9a302f6 (diff) | |
download | libgit2-4f76ef568d74c63031eb42fc10bf08b5641e5f0b.tar.gz |
oid: don't assume thread local state was initialized
git_oid_tostr_s could fail if thread-local state initialization fails.
In that case, it will now return `NULL`. Callers should check for
`NULL` and propagate the failure.
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/oid.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/git2/oid.h b/include/git2/oid.h index 399b7b907..35b43ef18 100644 --- a/include/git2/oid.h +++ b/include/git2/oid.h @@ -225,7 +225,7 @@ GIT_EXTERN(int) git_oid_pathfmt(char *out, const git_oid *id); * concurrent calls of the function. * * @param oid The oid structure to format - * @return the c-string + * @return the c-string or NULL on failure */ GIT_EXTERN(char *) git_oid_tostr_s(const git_oid *oid); |