Avoid mixing code and declarations in C expat code
Some compilers, notably MSVC, don't support C99 and C89 doesn't allow this.
Fixes MSVS compilation after 7e22fb4f64
.
This commit is contained in:
parent
7e22fb4f64
commit
c7a3785a5c
@ -1703,13 +1703,16 @@ XML_GetBuffer(XML_Parser parser, int len)
|
||||
}
|
||||
|
||||
if (len > bufferLim - bufferEnd) {
|
||||
#ifdef XML_CONTEXT_BYTES
|
||||
int keep;
|
||||
#endif
|
||||
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);
|
||||
keep = (int)(bufferPtr - buffer);
|
||||
|
||||
if (keep > XML_CONTEXT_BYTES)
|
||||
keep = XML_CONTEXT_BYTES;
|
||||
|
Loading…
Reference in New Issue
Block a user