xref: /optee_os/lib/libutils/isoc/sprintf.c (revision f35d131b0a82cca736f9670528a1e948f783852d)
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