size_t -> usize
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2022-12-07 17:06:29 +01:00
parent beab3454b5
commit 986aa01948
Signed by: apio
GPG Key ID: B8A7D06E42258954
2 changed files with 5 additions and 5 deletions

View File

@ -6,5 +6,5 @@
typedef Result<void> (*callback_t)(char, void*); typedef Result<void> (*callback_t)(char, void*);
Result<usize> cstyle_format(const char* format, callback_t callback, void* arg, va_list ap); Result<usize> cstyle_format(const char* format, callback_t callback, void* arg, va_list ap);
Result<usize> vstring_format(char* buf, size_t max, const char* format, va_list ap); Result<usize> vstring_format(char* buf, usize max, const char* format, va_list ap);
Result<usize> string_format(char* buf, size_t max, const char* format, ...); Result<usize> string_format(char* buf, usize max, const char* format, ...);

View File

@ -475,10 +475,10 @@ Result<usize> cstyle_format(const char* format, callback_t callback, void* arg,
struct StringFormatInfo struct StringFormatInfo
{ {
char* buffer; char* buffer;
size_t remaining; usize remaining;
}; };
Result<usize> vstring_format(char* buf, size_t max, const char* format, va_list ap) Result<usize> vstring_format(char* buf, usize max, const char* format, va_list ap)
{ {
StringFormatInfo info = {.buffer = buf, .remaining = max - 1}; StringFormatInfo info = {.buffer = buf, .remaining = max - 1};
@ -499,7 +499,7 @@ Result<usize> vstring_format(char* buf, size_t max, const char* format, va_list
return result; return result;
} }
Result<usize> string_format(char* buf, size_t max, const char* format, ...) Result<usize> string_format(char* buf, usize max, const char* format, ...)
{ {
va_list ap; va_list ap;
va_start(ap, format); va_start(ap, format);