summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte2011-07-16 14:52:18 +0200
committerHarald Welte2011-07-16 14:52:18 +0200
commit1520fad9329a8385c8ac0676791ccb5055a8eb4f (patch)
tree209920078f02c2d713d1d7f8d255da4ea543a000 /src
parentmisc: Fix crash in cell_log due missing l1_prim_cb (diff)
downloadosmocom-1520fad9329a8385c8ac0676791ccb5055a8eb4f.tar.gz
osmocom-1520fad9329a8385c8ac0676791ccb5055a8eb4f.tar.xz
osmocom-1520fad9329a8385c8ac0676791ccb5055a8eb4f.zip
osmocon: get rid of some Smash warnings
Diffstat (limited to 'src')
-rw-r--r--src/host/osmocon/osmocon.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c
index 7f8d3ac..2da711b 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);