summaryrefslogtreecommitdiffstats
path: root/dediprog.c
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2019-10-04 17:34:22 +0200
committerNico Huber <nico.h@gmx.de>2019-10-05 23:26:25 +0000
commit961f4a1f29787cbb6bd9a8a43b6ac4f3f0d024c0 (patch)
tree13023be2c6cc0140cbfa97dee108a441e696b638 /dediprog.c
parentb417c0c2d2616feff30cc87316a278055da8c64a (diff)
downloadflashrom-961f4a1f29787cbb6bd9a8a43b6ac4f3f0d024c0.tar.gz
flashrom-961f4a1f29787cbb6bd9a8a43b6ac4f3f0d024c0.tar.bz2
flashrom-961f4a1f29787cbb6bd9a8a43b6ac4f3f0d024c0.zip
Fix more sign-compare issues
The one in the `dummyflasher` is a little peculiar. We actually never knew the type of the `st_size` field in `struct stat`. It happens to be `signed` in some systems (e.g. DJGPP). Change-Id: If36ba22606021400b385ea6083eacc7b360c20c5 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/35800 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jacob Garber <jgarber1@ualberta.ca> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'dediprog.c')
-rw-r--r--dediprog.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dediprog.c b/dediprog.c
index fbd6930e4..e4124b0a7 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -1038,7 +1038,7 @@ int dediprog_init(void)
free(device);
return 1;
}
- if (usedevice < 0 || usedevice > UINT_MAX) {
+ if (usedevice < 0 || usedevice > INT_MAX) {
msg_perr("Error: Value for 'device' is out of range.\n");
free(device);
return 1;