]> git.zerfleddert.de Git - hmcfgusb/commitdiff
Cleanup: Cast explicitly where integers of different sign are compared
authorFlorian Franzmann <bwlf@bandrate.org>
Sat, 5 Sep 2020 14:56:04 +0000 (16:56 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sat, 5 Sep 2020 16:45:19 +0000 (18:45 +0200)
flash-ota.c

index 3963b4fee4908f947c997bbce28dc5b5bf3e8b4d..94e93729cb8487c8f033470d5ac903090099bfe1 100644 (file)
@@ -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;
                        }
Impressum, Datenschutz