From: Florian Franzmann Date: Sat, 5 Sep 2020 14:56:04 +0000 (+0200) Subject: Cleanup: Cast explicitly where integers of different sign are compared X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/hmcfgusb/commitdiff_plain/515b169a1b32c42eee2ddadee04ebc361303e0ee?ds=sidebyside Cleanup: Cast explicitly where integers of different sign are compared --- diff --git a/flash-ota.c b/flash-ota.c index 3963b4f..94e9372 100644 --- a/flash-ota.c +++ b/flash-ota.c @@ -201,7 +201,7 @@ static int parse_culfw(uint8_t *buf, int buf_len, void *data) rpos++; } - if (hmid && (SRC(rdata->message) != hmid)) + if (hmid && (SRC(rdata->message) != (int)hmid)) return 0; rdata->message_type = MESSAGE_TYPE_E; @@ -1094,7 +1094,7 @@ int main(int argc, char **argv) if (serial && !strncmp((char*)&(rdata.message[0x0b]), serial, 10)) { hmid = SRC(rdata.message); break; - } else if (!serial && SRC(rdata.message) == hmid) { + } else if (!serial && SRC(rdata.message) == (int)hmid) { serial = (char*)&(rdata.message[0x0b]); break; }