SITL: fixed warning comparing signed vs unsigned

This commit is contained in:
Tom Pittenger 2016-02-23 09:01:23 -08:00
parent e777176c4d
commit faa4238370

View File

@ -129,9 +129,9 @@ Connection: Keep-Alive
body += 4;
// get the rest of the body
uint32_t expected_length = content_length + (body - reply);
if (expected_length >= sizeof(reply)) {
printf("Reply too large %u\n", expected_length);
int32_t expected_length = content_length + (body - reply);
if (expected_length >= (int32_t)sizeof(reply)) {
printf("Reply too large %i\n", expected_length);
return nullptr;
}
while (ret < expected_length) {