Skip to content

Commit

Permalink
cosmetics+remove stray fprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
ivop committed Jan 23, 2014
1 parent 9b47da3 commit 5b82ed4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rkflashtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ int main(int argc, char **argv) {
recv_buf(RKFT_BLOCKSIZE);
recv_res();

if ( write(1, buf, RKFT_BLOCKSIZE) <= 0)
if (write(1, buf, RKFT_BLOCKSIZE) <= 0)
fatal("Write error! Disk full?\n");

offset += RKFT_OFF_INCR;
Expand Down Expand Up @@ -287,7 +287,7 @@ int main(int argc, char **argv) {
size = *p;
info("size: 0x%08x\n", size);

if ( write(1, &buf[8], size) <= 0) {
if (write(1, &buf[8], size) <= 0) {
fatal("Write error! Disk full?\n");
size = 0;
}
Expand All @@ -302,7 +302,7 @@ int main(int argc, char **argv) {
recv_buf(sizeRead);
recv_res();

if ( write(1, buf, sizeRead) <= 0) {
if (write(1, buf, sizeRead) <= 0) {
fatal("Write error! Disk full?\n");
size = 0;
}
Expand All @@ -319,7 +319,7 @@ int main(int argc, char **argv) {
recv_buf(RKFT_IDB_BLOCKSIZE * sizeRead);
recv_res();

if ( write(1, buf, RKFT_IDB_BLOCKSIZE * sizeRead) <= 0) {
if (write(1, buf, RKFT_IDB_BLOCKSIZE * sizeRead) <= 0) {
fatal("Write error! Disk full?\n");
size = 0;
}
Expand All @@ -339,7 +339,6 @@ int main(int argc, char **argv) {
offset += RKFT_OFF_INCR;
size -= RKFT_OFF_INCR;
}
fprintf(stderr, "\n");
break;
default:
break;
Expand Down

0 comments on commit 5b82ed4

Please sign in to comment.