c89 compat (gcc4, mingw..)

This commit is contained in:
Robin Gareus
2017-02-28 21:33:13 +01:00
parent a80920c016
commit ce2c3a9c70

View File

@@ -346,7 +346,8 @@ expected_message_length(unsigned char status, const unsigned char *second_byte,
* eg. ff02 8266 <0x166 byte (C) message follows>
*/
int32_t mlen = 0;
for (int32_t off = 1; off < 4; ++off) {
int32_t off;
for (off = 1; off < 4; ++off) {
uint8_t val = *(second_byte + off);
mlen = mlen << 7 | (val & 0x7f);
if (0 == (val & 0x80)) {