Skip to content

Commit

Permalink
Fix the 32bit signedness comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
lcp committed Nov 24, 2014
1 parent 1313fa0 commit cdb4b6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mokutil.c
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit cdb4b6f

Please sign in to comment.