Mercurial > hg > dmlib
comparison src/dmfile.c @ 2384:36edd316184a
Fix some format strings to use proper PRI*_SIZE_T where necessary.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 09 Jan 2020 15:20:23 +0200 |
parents | 5046458d6c34 |
children | 9807ae37ad69 |
comparison
equal
deleted
inserted
replaced
2383:43e39d9ec42f | 2384:36edd316184a |
---|---|
122 // Allocate initial data buffer | 122 // Allocate initial data buffer |
123 readSize = dataSize = BUF_SIZE_INITIAL; | 123 readSize = dataSize = BUF_SIZE_INITIAL; |
124 if ((dataBuf = dmMalloc(dataSize)) == NULL) | 124 if ((dataBuf = dmMalloc(dataSize)) == NULL) |
125 { | 125 { |
126 res = dmError(DMERR_MALLOC, | 126 res = dmError(DMERR_MALLOC, |
127 "Error allocating memory for data, %d bytes.\n", dataSize); | 127 "Error allocating memory for data, %" DM_PRIu_SIZE_T " bytes.\n", |
128 dataSize); | |
128 goto error; | 129 goto error; |
129 } | 130 } |
130 | 131 |
131 // Read the data | 132 // Read the data |
132 dataPos = dataRead = 0; | 133 dataPos = dataRead = 0; |
141 readSize = BUF_SIZE_GROW; | 142 readSize = BUF_SIZE_GROW; |
142 dataSize += BUF_SIZE_GROW; | 143 dataSize += BUF_SIZE_GROW; |
143 if ((dataBuf = dmRealloc(dataBuf, dataSize)) == NULL) | 144 if ((dataBuf = dmRealloc(dataBuf, dataSize)) == NULL) |
144 { | 145 { |
145 res = dmError(DMERR_MALLOC, | 146 res = dmError(DMERR_MALLOC, |
146 "Error reallocating memory for data, %d bytes.\n", | 147 "Error reallocating memory for data, %" DM_PRIu_SIZE_T " bytes.\n", |
147 dataSize); | 148 dataSize); |
148 goto error; | 149 goto error; |
149 } | 150 } |
150 } | 151 } |
151 else | 152 else |