Commit 2f14c4fc by Patrick Steinhardt

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.
parent 77d7e5eb
...@@ -76,7 +76,7 @@ int git_win32__stack_compare( ...@@ -76,7 +76,7 @@ int git_win32__stack_compare(
} }
int git_win32__stack_format( int git_win32__stack_format(
char *pbuf, int buf_len, char *pbuf, size_t buf_len,
const git_win32__stack__raw_data *pdata, const git_win32__stack__raw_data *pdata,
const char *prefix, const char *suffix) const char *prefix, const char *suffix)
{ {
...@@ -171,7 +171,7 @@ int git_win32__stack_format( ...@@ -171,7 +171,7 @@ int git_win32__stack_format(
} }
int git_win32__stack( int git_win32__stack(
char * pbuf, int buf_len, char * pbuf, size_t buf_len,
int skip, int skip,
const char *prefix, const char *suffix) const char *prefix, const char *suffix)
{ {
......
...@@ -116,7 +116,7 @@ int git_win32__stack_compare( ...@@ -116,7 +116,7 @@ int git_win32__stack_compare(
* @param suffix String written after each frame; defaults to "\n". * @param suffix String written after each frame; defaults to "\n".
*/ */
int git_win32__stack_format( int git_win32__stack_format(
char *pbuf, int buf_len, char *pbuf, size_t buf_len,
const git_win32__stack__raw_data *pdata, const git_win32__stack__raw_data *pdata,
const char *prefix, const char *suffix); const char *prefix, const char *suffix);
...@@ -132,7 +132,7 @@ int git_win32__stack_format( ...@@ -132,7 +132,7 @@ int git_win32__stack_format(
* @param suffix String written after each frame; defaults to "\n". * @param suffix String written after each frame; defaults to "\n".
*/ */
int git_win32__stack( int git_win32__stack(
char * pbuf, int buf_len, char * pbuf, size_t buf_len,
int skip, int skip,
const char *prefix, const char *suffix); const char *prefix, const char *suffix);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment