Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2012-09-22 02:04:39 +0400
committerRussell Belfer <rb@github.com>2012-09-22 02:04:39 +0400
commit1a628100534a315bd00361fc3d32df671923c107 (patch)
treec378b11f15a0323ff2c634bc63ec305255d45124 /src/errors.c
parent0cb24616eea3b92893b2a03e851a0db2c04862ef (diff)
Make giterr_set_str public
There has been discussion for a while about making some set of the `giterr_set` type functions part of the public API for code that is implementing new backends to libgit2. This makes the `giterr_set_str()` and `giterr_set_oom()` functions public.
Diffstat (limited to 'src/errors.c')
-rw-r--r--src/errors.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/errors.c b/src/errors.c
index 802ad3647..942a2f799 100644
--- a/src/errors.c
+++ b/src/errors.c
@@ -94,7 +94,11 @@ void giterr_set(int error_class, const char *string, ...)
void giterr_set_str(int error_class, const char *string)
{
- char *message = git__strdup(string);
+ char *message;
+
+ assert(string);
+
+ message = git__strdup(string);
if (message)
set_error(error_class, message);