Expat compilation fix for pre-C99 compilers.
Don't mix statements and declarations, this is not allowed in C89.
Fixes compilation with MSVC <= 10 after 28ba8ed84e
See #17083.
This commit is contained in:
parent
fc03d2698c
commit
9b029ea88a
@ -1703,14 +1703,15 @@ XML_GetBuffer(XML_Parser parser, int len)
|
||||
}
|
||||
|
||||
if (len > bufferLim - bufferEnd) {
|
||||
#ifdef XML_CONTEXT_BYTES
|
||||
int keep = (int)(bufferPtr - buffer);
|
||||
#endif /* defined XML_CONTEXT_BYTES */
|
||||
int neededSize = len + (int)(bufferEnd - bufferPtr);
|
||||
if (neededSize < 0) {
|
||||
errorCode = XML_ERROR_NO_MEMORY;
|
||||
return NULL;
|
||||
}
|
||||
#ifdef XML_CONTEXT_BYTES
|
||||
int keep = (int)(bufferPtr - buffer);
|
||||
|
||||
if (keep > XML_CONTEXT_BYTES)
|
||||
keep = XML_CONTEXT_BYTES;
|
||||
neededSize += keep;
|
||||
|
Loading…
Reference in New Issue
Block a user