summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-12-08 19:28:44 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2023-05-13 14:09:25 +0100
commit4f76ef568d74c63031eb42fc10bf08b5641e5f0b (patch)
tree7b96d7c1bdf5508c40c22d7517e17da1fe779418 /include
parentce488be46e4cd2aeeb69c39a062fae1ba9a302f6 (diff)
downloadlibgit2-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.h2
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);