aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-oc2g
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2019-03-15 14:42:57 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2019-04-08 11:23:39 +0200
commit620c74b7fec3df2f3a553070d23e5e633594d654 (patch)
treea4cb2925b7a804dfff9bc5440de41320cb62d6f0 /src/osmo-bts-oc2g
parenta89581b22dad254ff1e888672c933856d9991c57 (diff)
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
Diffstat (limited to 'src/osmo-bts-oc2g')
-rw-r--r--src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c b/src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c
index 33c07829..3ddf0e8c 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 @@ static int oc2gbts_par_get_uptime(void *ctx, int *ret)
fpath = talloc_asprintf(ctx, "%s", UPTIME_TMP_PATH);
if (!fpath)
- return NULL;
+ return -EINVAL;
fp = fopen(fpath, "r");
if (!fp)
@@ -117,7 +117,7 @@ static int oc2gbts_par_set_uptime(void *ctx, int val)
fpath = talloc_asprintf(ctx, "%s", UPTIME_TMP_PATH);
if (!fpath)
- return NULL;
+ return -EINVAL;
fp = fopen(fpath, "w");
if (!fp)