Permalink
Browse files

Fix the 32bit signedness comparison

  • Loading branch information...
1 parent 1313fa0 commit cdb4b6f3bfd6ada6558ddfb889e27150f0841b28 @lcp committed Nov 24, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/mokutil.c
View
@@ -1284,7 +1284,7 @@ issue_mok_request (char **files, uint32_t total, MokRequest req,
/* Mok */
read_size = read (fd, ptr, sizes[i]);
- if (read_size < 0 || read_size != sizes[i]) {
+ if (read_size < 0 || read_size != (int64_t)sizes[i]) {
fprintf (stderr, "Failed to read %s\n", files[i]);
goto error;
}
@@ -1645,7 +1645,7 @@ export_moks ()
goto error;
}
- while (offset < list[i].mok_size) {
+ while (offset < (int64_t)list[i].mok_size) {
write_size = write (fd, list[i].mok + offset,
list[i].mok_size - offset);
if (write_size < 0) {

0 comments on commit cdb4b6f

Please sign in to comment.