@@ -22,7 +22,7 @@ bool msgpack_vrefbuffer_init(msgpack_vrefbuffer* vbuf,
2222 size_t ref_size , size_t chunk_size )
2323{
2424 size_t nfirst ;
25- struct iovec * array ;
25+ msgpack_iovec * array ;
2626 msgpack_vrefbuffer_chunk * chunk ;
2727
2828 if (ref_size == 0 ) {
@@ -40,11 +40,11 @@ bool msgpack_vrefbuffer_init(msgpack_vrefbuffer* vbuf,
4040 return false;
4141 }
4242
43- nfirst = (sizeof (struct iovec ) < 72 /2 ) ?
44- 72 / sizeof (struct iovec ) : 8 ;
43+ nfirst = (sizeof (msgpack_iovec ) < 72 /2 ) ?
44+ 72 / sizeof (msgpack_iovec ) : 8 ;
4545
46- array = (struct iovec * )malloc (
47- sizeof (struct iovec ) * nfirst );
46+ array = (msgpack_iovec * )malloc (
47+ sizeof (msgpack_iovec ) * nfirst );
4848 if (array == NULL ) {
4949 return false;
5050 }
@@ -114,8 +114,8 @@ int msgpack_vrefbuffer_append_ref(msgpack_vrefbuffer* vbuf,
114114 const size_t nused = (size_t )(vbuf -> tail - vbuf -> array );
115115 const size_t nnext = nused * 2 ;
116116
117- struct iovec * nvec = (struct iovec * )realloc (
118- vbuf -> array , sizeof (struct iovec )* nnext );
117+ msgpack_iovec * nvec = (msgpack_iovec * )realloc (
118+ vbuf -> array , sizeof (msgpack_iovec )* nnext );
119119 if (nvec == NULL ) {
120120 return -1 ;
121121 }
@@ -194,7 +194,7 @@ int msgpack_vrefbuffer_migrate(msgpack_vrefbuffer* vbuf, msgpack_vrefbuffer* to)
194194 {
195195 const size_t nused = (size_t )(vbuf -> tail - vbuf -> array );
196196 if (to -> tail + nused < vbuf -> end ) {
197- struct iovec * nvec ;
197+ msgpack_iovec * nvec ;
198198 const size_t tosize = (size_t )(to -> tail - to -> array );
199199 const size_t reqsize = nused + tosize ;
200200 size_t nnext = (size_t )(to -> end - to -> array ) * 2 ;
@@ -207,8 +207,8 @@ int msgpack_vrefbuffer_migrate(msgpack_vrefbuffer* vbuf, msgpack_vrefbuffer* to)
207207 nnext = tmp_nnext ;
208208 }
209209
210- nvec = (struct iovec * )realloc (
211- to -> array , sizeof (struct iovec )* nnext );
210+ nvec = (msgpack_iovec * )realloc (
211+ to -> array , sizeof (msgpack_iovec )* nnext );
212212 if (nvec == NULL ) {
213213 free (empty );
214214 return -1 ;
@@ -219,7 +219,7 @@ int msgpack_vrefbuffer_migrate(msgpack_vrefbuffer* vbuf, msgpack_vrefbuffer* to)
219219 to -> tail = nvec + tosize ;
220220 }
221221
222- memcpy (to -> tail , vbuf -> array , sizeof (struct iovec )* nused );
222+ memcpy (to -> tail , vbuf -> array , sizeof (msgpack_iovec )* nused );
223223
224224 to -> tail += nused ;
225225 vbuf -> tail = vbuf -> array ;
0 commit comments