summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlosmn@github.com>2016-11-17 15:45:23 +0100
committerGitHub <noreply@github.com>2016-11-17 15:45:23 +0100
commit6b0510e5e14b9f2cf7330729a98c422819800ea3 (patch)
tree216495c9a68e7b0f48fbe36a7b24728b4555324b
parenta6763ff93aed9a1486c4f84d77151ff57dd4795e (diff)
parent65b78ea3013c3e1a5fd70e4dee6e08996cdcaa62 (diff)
downloadlibgit2-6b0510e5e14b9f2cf7330729a98c422819800ea3.tar.gz
Merge pull request #4009 from pranitbauva1997/fix-string-format
use `giterr_set_str()` wherever possible
-rw-r--r--src/index.c2
-rw-r--r--src/zstream.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/index.c b/src/index.c
index bc15959a8..42579f19a 100644
--- a/src/index.c
+++ b/src/index.c
@@ -552,7 +552,7 @@ int git_index_clear(git_index *index)
static int create_index_error(int error, const char *msg)
{
- giterr_set(GITERR_INDEX, msg);
+ giterr_set_str(GITERR_INDEX, msg);
return error;
}
diff --git a/src/zstream.c b/src/zstream.c
index d9ad4ca89..d949aa81a 100644
--- a/src/zstream.c
+++ b/src/zstream.c
@@ -21,7 +21,7 @@ static int zstream_seterr(git_zstream *zs)
if (zs->zerr == Z_MEM_ERROR)
giterr_set_oom();
else if (zs->z.msg)
- giterr_set(GITERR_ZLIB, zs->z.msg);
+ giterr_set_str(GITERR_ZLIB, zs->z.msg);
else
giterr_set(GITERR_ZLIB, "Unknown compression error");