1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index 661445c..ab66288 100644
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -2375,16 +2375,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
characters = 0;
while (precision > 0)
{
- char buf[64]; /* Assume MB_CUR_MAX <= 64. */
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
int count;
if (*arg_end == 0)
/* Found the terminating null wide character. */
break;
# if HAVE_WCRTOMB
- count = wcrtomb (buf, *arg_end, &state);
+ count = wcrtomb (cbuf, *arg_end, &state);
# else
- count = wctomb (buf, *arg_end);
+ count = wctomb (cbuf, *arg_end);
# endif
if (count < 0)
{
@@ -2420,16 +2420,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
characters = 0;
for (;;)
{
- char buf[64]; /* Assume MB_CUR_MAX <= 64. */
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
int count;
if (*arg_end == 0)
/* Found the terminating null wide character. */
break;
# if HAVE_WCRTOMB
- count = wcrtomb (buf, *arg_end, &state);
+ count = wcrtomb (cbuf, *arg_end, &state);
# else
- count = wctomb (buf, *arg_end);
+ count = wctomb (cbuf, *arg_end);
# endif
if (count < 0)
{
@@ -2470,20 +2470,20 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
# endif
for (remaining = characters; remaining > 0; )
{
- char buf[64]; /* Assume MB_CUR_MAX <= 64. */
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
int count;
if (*arg == 0)
abort ();
# if HAVE_WCRTOMB
- count = wcrtomb (buf, *arg, &state);
+ count = wcrtomb (cbuf, *arg, &state);
# else
- count = wctomb (buf, *arg);
+ count = wctomb (cbuf, *arg);
# endif
if (count <= 0)
/* Inconsistency. */
abort ();
- memcpy (tmpptr, buf, count);
+ memcpy (tmpptr, cbuf, count);
tmpptr += count;
arg++;
remaining -= count;
@@ -2552,20 +2552,20 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
ENSURE_ALLOCATION (xsum (length, characters));
for (remaining = characters; remaining > 0; )
{
- char buf[64]; /* Assume MB_CUR_MAX <= 64. */
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
int count;
if (*arg == 0)
abort ();
# if HAVE_WCRTOMB
- count = wcrtomb (buf, *arg, &state);
+ count = wcrtomb (cbuf, *arg, &state);
# else
- count = wctomb (buf, *arg);
+ count = wctomb (cbuf, *arg);
# endif
if (count <= 0)
/* Inconsistency. */
abort ();
- memcpy (result + length, buf, count);
+ memcpy (result + length, cbuf, count);
length += count;
arg++;
remaining -= count;
@@ -2581,21 +2581,21 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
# endif
while (arg < arg_end)
{
- char buf[64]; /* Assume MB_CUR_MAX <= 64. */
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
int count;
if (*arg == 0)
abort ();
# if HAVE_WCRTOMB
- count = wcrtomb (buf, *arg, &state);
+ count = wcrtomb (cbuf, *arg, &state);
# else
- count = wctomb (buf, *arg);
+ count = wctomb (cbuf, *arg);
# endif
if (count <= 0)
/* Inconsistency. */
abort ();
ENSURE_ALLOCATION (xsum (length, count));
- memcpy (result + length, buf, count);
+ memcpy (result + length, cbuf, count);
length += count;
arg++;
}
|