summaryrefslogtreecommitdiff
path: root/src/win32/w32_buffer.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-11-22 09:43:06 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2020-11-25 11:42:07 +0000
commit7b185b83dddde4aa6d1fd6c158c115b618e0814d (patch)
tree91f8db499feb0e2e60994fc506cf690943b2a724 /src/win32/w32_buffer.c
parentc7d607992319c0b117f07960b973bf7cd63fe90f (diff)
downloadlibgit2-ethomson/assert.tar.gz
win32: use GIT_ASSERTethomson/assert
Diffstat (limited to 'src/win32/w32_buffer.c')
-rw-r--r--src/win32/w32_buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/win32/w32_buffer.c b/src/win32/w32_buffer.c
index b78a7e6f3..f270a1e6a 100644
--- a/src/win32/w32_buffer.c
+++ b/src/win32/w32_buffer.c
@@ -32,13 +32,13 @@ int git_buf_put_w(git_buf *buf, const wchar_t *string_w, size_t len_w)
return -1;
}
- assert(string_w);
+ GIT_ASSERT(string_w);
/* Measure the string necessary for conversion */
if ((utf8_len = WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, string_w, (int)len_w, NULL, 0, NULL, NULL)) == 0)
return 0;
- assert(utf8_len > 0);
+ GIT_ASSERT(utf8_len > 0);
GIT_ERROR_CHECK_ALLOC_ADD(&new_size, buf->size, (size_t)utf8_len);
GIT_ERROR_CHECK_ALLOC_ADD(&new_size, new_size, 1);
@@ -50,7 +50,7 @@ int git_buf_put_w(git_buf *buf, const wchar_t *string_w, size_t len_w)
CP_UTF8, WC_ERR_INVALID_CHARS, string_w, (int)len_w, &buf->ptr[buf->size], utf8_len, NULL, NULL)) == 0)
return handle_wc_error();
- assert(utf8_write_len == utf8_len);
+ GIT_ASSERT(utf8_write_len == utf8_len);
buf->size += utf8_write_len;
buf->ptr[buf->size] = '\0';