diff options
author | Vicent Martà <vicent@github.com> | 2012-09-25 14:53:13 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2012-09-25 14:53:13 -0700 |
commit | 5942bd18bf557cc70873009c4303a421c83f0129 (patch) | |
tree | 54595289898a934b176b99859a0689ae11a9bce0 /src/errors.c | |
parent | 31d22037a63443c415462bed76dffda5d3c2de2c (diff) | |
parent | 1a628100534a315bd00361fc3d32df671923c107 (diff) | |
download | libgit2-5942bd18bf557cc70873009c4303a421c83f0129.tar.gz |
Merge pull request #947 from arrbee/public-error-set
Make giterr_set_str() and giterr_set_oom() public APIs
Diffstat (limited to 'src/errors.c')
-rw-r--r-- | src/errors.c | 6 |
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); |