Merge pull request #311 from nulltoken/ntk/fix-win32-specs Ntk/fix win32 specs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
diff --git a/src/reflog.c b/src/reflog.c
index df01199..ce88c10 100644
--- a/src/reflog.c
+++ b/src/reflog.c
@@ -105,7 +105,7 @@ static int reflog_write(git_repository *repo, const char *ref_name,
static int reflog_parse(git_reflog *log, const char *buf, size_t buf_size)
{
- int error;
+ int error = GIT_SUCCESS;
const char *ptr;
git_reflog_entry *entry;
diff --git a/src/tsort.c b/src/tsort.c
index 63fd433..2c8aab3 100644
--- a/src/tsort.c
+++ b/src/tsort.c
@@ -18,7 +18,7 @@
#if defined(__GNUC__)
# define CLZ(x) __builtin_clz(x)
-#elif defined(_MSV_VER)
+#elif defined(_MSC_VER)
# define CLZ(x) _CountLeadingZeros(x)
#else
int CLZ(int32_t x)
diff --git a/src/util.c b/src/util.c
index 4a44f99..a51cbe6 100644
--- a/src/util.c
+++ b/src/util.c
@@ -5,7 +5,7 @@
#include <ctype.h>
#include "posix.h"
-#ifdef _MSV_VER
+#ifdef _MSC_VER
# include <Shlwapi.h>
#endif
diff --git a/src/win32/posix.c b/src/win32/posix.c
index c4d9eb3..1ce3f05 100644
--- a/src/win32/posix.c
+++ b/src/win32/posix.c
@@ -211,7 +211,7 @@ char *p_realpath(const char *orig_path, char *buffer)
int p_vsnprintf(char *buffer, size_t count, const char *format, va_list argptr)
{
-#ifdef _MSV_VER
+#ifdef _MSC_VER
int len = _vsnprintf(buffer, count, format, argptr);
return (len < 0) ? _vscprintf(format, argptr) : len;
#else /* MinGW */