summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-06-28 14:39:20 +0200
committerPatrick Steinhardt <ps@pks.im>2019-07-05 11:32:11 +0200
commit2f14c4fcb80cddb06de19c7d412ef25395cde67b (patch)
tree303e1fb3151e7de8b1e7684030c57298e1c859bc /src/win32
parent77d7e5eb94f02bf50daf64834ece177b15a64302 (diff)
downloadlibgit2-2f14c4fcb80cddb06de19c7d412ef25395cde67b.tar.gz
w32_stack: convert buffer length param to `size_t`
In both `git_win32__stack_format` and `git_win32__stack`, we handle buffer lengths via an integer variable. As we only ever pass buffer sizes to it, this should be a `size_t` though to avoid loss of precision. As we also use it to compare with other `size_t` variables, this also silences signed/unsigned comparison warnings.
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/w32_stack.c4
-rw-r--r--src/win32/w32_stack.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/win32/w32_stack.c b/src/win32/w32_stack.c
index 67a50ef34..78c78dbbd 100644
--- a/src/win32/w32_stack.c
+++ b/src/win32/w32_stack.c
@@ -76,7 +76,7 @@ int git_win32__stack_compare(
}
int git_win32__stack_format(
- char *pbuf, int buf_len,
+ char *pbuf, size_t buf_len,
const git_win32__stack__raw_data *pdata,
const char *prefix, const char *suffix)
{
@@ -171,7 +171,7 @@ int git_win32__stack_format(
}
int git_win32__stack(
- char * pbuf, int buf_len,
+ char * pbuf, size_t buf_len,
int skip,
const char *prefix, const char *suffix)
{
diff --git a/src/win32/w32_stack.h b/src/win32/w32_stack.h
index 3196981c8..c2565c228 100644
--- a/src/win32/w32_stack.h
+++ b/src/win32/w32_stack.h
@@ -116,7 +116,7 @@ int git_win32__stack_compare(
* @param suffix String written after each frame; defaults to "\n".
*/
int git_win32__stack_format(
- char *pbuf, int buf_len,
+ char *pbuf, size_t buf_len,
const git_win32__stack__raw_data *pdata,
const char *prefix, const char *suffix);
@@ -132,7 +132,7 @@ int git_win32__stack_format(
* @param suffix String written after each frame; defaults to "\n".
*/
int git_win32__stack(
- char * pbuf, int buf_len,
+ char * pbuf, size_t buf_len,
int skip,
const char *prefix, const char *suffix);