Skip to content

Commit

Permalink
mkbootimg: fixing the typecast issue
Browse files Browse the repository at this point in the history
Change-Id: Ic375089ecce7aed3f9968e5e0b48e8ae0df66d83

Resolution: adjust placement and remove redundant code
  • Loading branch information
Shruthi Krishna authored and osm0sis committed Feb 5, 2016
1 parent 0cb0045 commit 847b8fe
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mkbootimg.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,13 @@ int main(int argc, char **argv)
}

if(dt_data) {
if(write(fd, dt_data, hdr.dt_size) != hdr.dt_size) goto fail;
if(write(fd, dt_data, hdr.dt_size) != (ssize_t) hdr.dt_size) goto fail;
if(write_padding(fd, pagesize, hdr.dt_size)) goto fail;
}

if (get_id) {
print_id((uint8_t *) hdr.id, sizeof(hdr.id));
}

if(dt_data) {
if(write(fd, dt_data, hdr.dt_size) != hdr.dt_size) goto fail;
if(write_padding(fd, pagesize, hdr.dt_size)) goto fail;
}
return 0;

fail:
Expand Down

0 comments on commit 847b8fe

Please sign in to comment.