Change in osmo-bts[master]: oc2gbts_mgr_calib: do not return NULL on integer function

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/.

dexter gerrit-no-reply at lists.osmocom.org
Mon Apr 8 13:16:39 UTC 2019


dexter has submitted this change and it was merged. ( https://gerrit.osmocom.org/13272 )

Change subject: oc2gbts_mgr_calib: do not return NULL on integer function
......................................................................

oc2gbts_mgr_calib: do not return NULL on integer function

The functions oc2gbts_par_get_uptime() and oc2gbts_par_set_uptime() try
to return with NULL, but both functions are declared as int. Lets return
-EINVAL instead.

Change-Id: I63b61be2940c59b221089d3d1501371b0116d89a
---
M src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Pau Espin Pedrol: Looks good to me, approved
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
index 33c0782..3ddf0e8 100644
--- a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
+++ b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
@@ -87,7 +87,7 @@
 
 	fpath = talloc_asprintf(ctx, "%s", UPTIME_TMP_PATH);
 	if (!fpath)
-		return NULL;
+		return -EINVAL;
 
 	fp = fopen(fpath, "r");
 	if (!fp)
@@ -117,7 +117,7 @@
 
 	fpath = talloc_asprintf(ctx, "%s", UPTIME_TMP_PATH);
 	if (!fpath)
-		return NULL;
+		return -EINVAL;
 
 	fp = fopen(fpath, "w");
 	if (!fp)

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I63b61be2940c59b221089d3d1501371b0116d89a
Gerrit-Change-Number: 13272
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Daniel Willmann <dwillmann at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190408/8b2c9b55/attachment.htm>


More information about the gerrit-log mailing list