repo.or.cz
/
nasm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove duplicate warnings for immediate overflow
[nasm.git]
/
stdlib
/
snprintf.c
blob
95bfc3147ee4e7d23f0233b1d80fc6f07c384701
1
/*
2
* snprintf()
3
*
4
* Implement snprintf() in terms of vsnprintf()
5
*/
6
7
#include
"compiler.h"
8
9
#include <stdio.h>
10
#include <stdlib.h>
11
#include <stdarg.h>
12
13
#include
"nasmlib.h"
14
15
#if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF)
16
17
int
snprintf
(
char
*
str
,
size_t
size
,
const char
*
format
, ...)
18
{
19
va_list
ap
;
20
int
rv
;
21
22
va_start
(
ap
,
format
);
23
rv
=
vsnprintf
(
str
,
size
,
format
,
ap
);
24
va_end
(
ap
);
25
26
return
rv
;
27
}
28
29
#endif