Change in osmo-trx[master]: osmo-trx: Check return code of osmo_fd_register

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Thu Apr 4 10:46:19 UTC 2019


Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13482 )

Change subject: osmo-trx: Check return code of osmo_fd_register
......................................................................

osmo-trx: Check return code of osmo_fd_register

Fixes Coverity CID 197513.
Change-Id: I93fbcb062439a547379aaecba283d107fdc9cb59
---
M Transceiver52M/osmo-trx.cpp
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  Pau Espin Pedrol: Looks good to me, approved



diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 88b9de0..b252d0c 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -237,7 +237,10 @@
 	}
 
 	osmo_fd_setup(&signal_ofd, sfd, OSMO_FD_READ, signalfd_callback, NULL, 0);
-	osmo_fd_register(&signal_ofd);
+	if (osmo_fd_register(&signal_ofd) < 0) {
+		fprintf(stderr, "osmo_fd_register() failed.\n");
+		exit(EXIT_FAILURE);
+	}
 }
 
 static void print_help()

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I93fbcb062439a547379aaecba283d107fdc9cb59
Gerrit-Change-Number: 13482
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190404/4923356d/attachment.htm>


More information about the gerrit-log mailing list