summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2011-06-17 15:44:26 -0700
committerVicent Martí <tanoku@gmail.com>2011-06-17 15:44:26 -0700
commitdeee4766a88a89cc4c77543c02bde93ba03e8d7c (patch)
tree5f8342aea9043e79e41b8945ad454badbb2351c3
parent07ff881750a073dc17519f3b03f266468e124819 (diff)
parentf0619886672be97bf574897989b9840557d15ecd (diff)
downloadlibgit2-deee4766a88a89cc4c77543c02bde93ba03e8d7c.tar.gz
Merge pull request #267 from Jopie64/development
Fix compilation error in MSVC when compiling for c++
-rw-r--r--src/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h
index 72e3a9c68..c81dd7897 100644
--- a/src/util.h
+++ b/src/util.h
@@ -43,7 +43,7 @@ GIT_INLINE(char *) git__strndup(const char *str, size_t n)
if (n < length)
length = n;
- ptr = malloc(length + 1);
+ ptr = (char*)malloc(length + 1);
if (!ptr)
git__throw(GIT_ENOMEM, "Out of memory. Failed to duplicate string");