mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-14 03:03:14 +08:00
style
This commit is contained in:
parent
b205833df4
commit
7a22d334e2
1 changed files with 5 additions and 5 deletions
|
@ -782,7 +782,7 @@ static int _vsnprintf(out_fct_type out, char *buffer, const size_t maxlen, const
|
|||
|
||||
case 's' : {
|
||||
const char *p = va_arg(va, char *);
|
||||
unsigned int l = _strnlen_s(p, precision ? precision : (size_t) -1);
|
||||
unsigned int l = _strnlen_s(p, precision ? precision : (size_t) - 1);
|
||||
// pre padding
|
||||
if (flags & FLAGS_PRECISION) {
|
||||
l = (l < precision ? l : precision);
|
||||
|
@ -849,7 +849,7 @@ int printf_(const char *format, ...) {
|
|||
va_list va;
|
||||
va_start(va, format);
|
||||
char buffer[1];
|
||||
const int ret = _vsnprintf(_out_char, buffer, (size_t) -1, format, va);
|
||||
const int ret = _vsnprintf(_out_char, buffer, (size_t) - 1, format, va);
|
||||
va_end(va);
|
||||
return ret;
|
||||
}
|
||||
|
@ -858,7 +858,7 @@ int printf_(const char *format, ...) {
|
|||
int sprintf_(char *buffer, const char *format, ...) {
|
||||
va_list va;
|
||||
va_start(va, format);
|
||||
const int ret = _vsnprintf(_out_buffer, buffer, (size_t) -1, format, va);
|
||||
const int ret = _vsnprintf(_out_buffer, buffer, (size_t) - 1, format, va);
|
||||
va_end(va);
|
||||
return ret;
|
||||
}
|
||||
|
@ -875,7 +875,7 @@ int snprintf_(char *buffer, size_t count, const char *format, ...) {
|
|||
|
||||
int vprintf_(const char *format, va_list va) {
|
||||
char buffer[1];
|
||||
return _vsnprintf(_out_char, buffer, (size_t) -1, format, va);
|
||||
return _vsnprintf(_out_char, buffer, (size_t) - 1, format, va);
|
||||
}
|
||||
|
||||
|
||||
|
@ -888,7 +888,7 @@ int fctprintf(void (*out)(char character, void *arg), void *arg, const char *for
|
|||
va_list va;
|
||||
va_start(va, format);
|
||||
const out_fct_wrap_type out_fct_wrap = { out, arg };
|
||||
const int ret = _vsnprintf(_out_fct, (char *)(uintptr_t)&out_fct_wrap, (size_t) -1, format, va);
|
||||
const int ret = _vsnprintf(_out_fct, (char *)(uintptr_t)&out_fct_wrap, (size_t) - 1, format, va);
|
||||
va_end(va);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue