mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Move variable declaration to top of block
This commit is contained in:
parent
c5e6211936
commit
e32fb4f777
2
_webp.c
2
_webp.c
|
@ -34,6 +34,7 @@ static const char* const kErrorMessages[-WEBP_MUX_NOT_ENOUGH_DATA + 1] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
PyObject* HandleMuxError(WebPMuxError err, char* chunk) {
|
PyObject* HandleMuxError(WebPMuxError err, char* chunk) {
|
||||||
|
char message[100];
|
||||||
assert(err <= WEBP_MUX_NOT_FOUND && err >= WEBP_MUX_NOT_ENOUGH_DATA);
|
assert(err <= WEBP_MUX_NOT_FOUND && err >= WEBP_MUX_NOT_ENOUGH_DATA);
|
||||||
|
|
||||||
// Check for a memory error first
|
// Check for a memory error first
|
||||||
|
@ -42,7 +43,6 @@ PyObject* HandleMuxError(WebPMuxError err, char* chunk) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create the error message
|
// Create the error message
|
||||||
char message[100];
|
|
||||||
if (chunk == NULL) {
|
if (chunk == NULL) {
|
||||||
sprintf(message, "could not assemble chunks: %s", kErrorMessages[-err]);
|
sprintf(message, "could not assemble chunks: %s", kErrorMessages[-err]);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user