xref: /optee_os/lib/libutils/isoc/sprintf.c (revision 9fc2442cc66c279cb962c90c4375746fc9b28bb9)
1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3  * Copyright (c) 2020, Huawei Technologies Co., Ltd
4  */
5 
6 #include <printk.h>
7 #include <stdio.h>
8 
9 int sprintf(char *str, const char *fmt, ...)
10 {
11 	int retval;
12 	va_list ap;
13 
14 	va_start(ap, fmt);
15 	retval = __vsprintf(str, fmt, ap);
16 	va_end(ap);
17 
18 	return retval;
19 }
20