Silence sign-compare warnings in dfu.c
This commit is contained in:
parent
b75e26bf6d
commit
7ad5289d66
|
@ -275,12 +275,12 @@ int dfu_getstatus(struct dfu_dev *dfu, struct dfu_status *status)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result < sizeof(struct dfu_status)) {
|
if (result < (int) sizeof(struct dfu_status)) {
|
||||||
pmsg_error("unable to get DFU status: %s\n", "short read");
|
pmsg_error("unable to get DFU status: %s\n", "short read");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result > sizeof(struct dfu_status)) {
|
if (result > (int) sizeof(struct dfu_status)) {
|
||||||
pmsg_error("oversize read (should not happen); exiting\n");
|
pmsg_error("oversize read (should not happen); exiting\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue