Skip to content

Commit 1e0ce3d

Browse files
twcook86danielinux
authored andcommitted
fix vsnprintf issue
1 parent 5b2411d commit 1e0ce3d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

test-app/syscalls.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ int _getpid(void)
141141
* other OS facilities that don't exist in bare-metal.
142142
* wolfCrypt test/benchmark code calls standard printf, not wolfBoot_printf.
143143
*/
144-
static int vsnprintf(char *buf, unsigned int size, const char *fmt, va_list argp);
144+
static int ___vsnprintf(char *buf, unsigned int size, const char *fmt, va_list argp);
145145

146146
/* Route all printf-family functions through our vsnprintf (in this file)
147147
* rather than uart_vprintf (in string.c). This ensures float formatting
@@ -150,7 +150,7 @@ static int vsnprintf(char *buf, unsigned int size, const char *fmt, va_list argp
150150
int vprintf(const char *fmt, va_list args)
151151
{
152152
char buf[256];
153-
int len = vsnprintf(buf, sizeof(buf), fmt, args);
153+
int len = ___vsnprintf(buf, sizeof(buf), fmt, args);
154154
if (len > 0)
155155
uart_write(buf, (len < (int)sizeof(buf)) ? len : (int)sizeof(buf) - 1);
156156
return len;
@@ -222,7 +222,7 @@ static int buf_num(char *buf, int pos, int size, unsigned int num,
222222
return pos;
223223
}
224224

225-
static int vsnprintf(char *buf, unsigned int size, const char *fmt, va_list argp)
225+
static int ___vsnprintf(char *buf, unsigned int size, const char *fmt, va_list argp)
226226
{
227227
int pos = 0;
228228
const char *fmtp = fmt;
@@ -375,7 +375,7 @@ int snprintf(char *buf, unsigned int size, const char *fmt, ...)
375375
va_list args;
376376
int ret;
377377
va_start(args, fmt);
378-
ret = vsnprintf(buf, size, fmt, args);
378+
ret = ___vsnprintf(buf, size, fmt, args);
379379
va_end(args);
380380
return ret;
381381
}
@@ -439,7 +439,7 @@ int __snprintf_chk(char *buf, unsigned int maxlen, int flag,
439439
int ret;
440440
(void)flag;
441441
va_start(args, fmt);
442-
ret = vsnprintf(buf, size, fmt, args);
442+
ret = ___vsnprintf(buf, size, fmt, args);
443443
va_end(args);
444444
return ret;
445445
}

0 commit comments

Comments
 (0)