Change in ...osmocom-bb[master]: osmocon: Check write() return code

laforge gerrit-no-reply at lists.osmocom.org
Sun Jul 21 07:22:17 UTC 2019


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/14855


Change subject: osmocon: Check write() return code
......................................................................

osmocon: Check write() return code

Change-Id: I61d8f104a4d2558fd5b6fb34c7f2fd6c13354c12
Closes: CID#198567
---
M src/host/osmocon/osmocon.c
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/55/14855/1

diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c
index 61672a3..f4d9111 100644
--- a/src/host/osmocon/osmocon.c
+++ b/src/host/osmocon/osmocon.c
@@ -630,6 +630,7 @@
 		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 @@
 		perror("Error during write");
 		return rc;
 	}
+	OSMO_ASSERT(rc == write_len);
 
 	dnload.write_ptr += rc;
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/14855
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I61d8f104a4d2558fd5b6fb34c7f2fd6c13354c12
Gerrit-Change-Number: 14855
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at gnumonks.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190721/6eecb0e0/attachment.html>


More information about the gerrit-log mailing list