diff options
author | Harald Welte <laforge@gnumonks.org> | 2019-07-21 09:02:55 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2019-07-21 09:02:55 +0200 |
commit | cb587bb29ece8c7bffcd9e63e46920efc59a51b6 (patch) | |
tree | 8d7b366c16e188a476940f72554a4613848fcffd /src | |
parent | 58425e978d4fa440fbf2015ac4cbbdb9fd0c900c (diff) |
osmocon: Check write() return code
Change-Id: I61d8f104a4d2558fd5b6fb34c7f2fd6c13354c12
Closes: CID#198567
Diffstat (limited to 'src')
-rw-r--r-- | src/host/osmocon/osmocon.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c index 61672a3f..f4d91113 100644 --- a/src/host/osmocon/osmocon.c +++ b/src/host/osmocon/osmocon.c @@ -630,6 +630,7 @@ static int handle_write_dnload(void) case MODE_C140xor: case MODE_C123xor: rc = write(dnload.serial_fd.fd, &xor_init, 1); + OSMO_ASSERT(rc == 1); break; default: break; @@ -652,6 +653,7 @@ static int handle_write_dnload(void) perror("Error during write"); return rc; } + OSMO_ASSERT(rc == write_len); dnload.write_ptr += rc; |