diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-07-16 14:52:18 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-07-16 14:52:18 +0200 |
commit | 1520fad9329a8385c8ac0676791ccb5055a8eb4f (patch) | |
tree | 209920078f02c2d713d1d7f8d255da4ea543a000 /src/host/osmocon | |
parent | 58a1b814258886b5be19977c290fb8f6e0078e34 (diff) |
osmocon: get rid of some Smash warnings
Diffstat (limited to 'src/host/osmocon')
-rw-r--r-- | src/host/osmocon/osmocon.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c index 7f8d3ac7..2da711b2 100644 --- a/src/host/osmocon/osmocon.c +++ b/src/host/osmocon/osmocon.c @@ -335,10 +335,8 @@ int read_file(const char *filename) return -EFBIG; } - if (dnload.data) { - free(dnload.data); - dnload.data = NULL; - } + free(dnload.data); + dnload.data = NULL; if (dnload.mode == MODE_C140 || dnload.mode == MODE_C140xor) { if (st.st_size < (MAGIC_OFFSET + sizeof(phone_magic))) @@ -1551,8 +1549,10 @@ int main(int argc, char **argv) dnload.load_address[2] = (tmp_load_address >> 8) & 0xff; dnload.load_address[3] = tmp_load_address & 0xff; - while (1) - osmo_select_main(0); + while (1) { + if (osmo_select_main(0) < 0) + break; + } close(dnload.serial_fd.fd); |