diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2019-03-15 14:42:57 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2019-04-08 11:23:39 +0200 |
commit | 620c74b7fec3df2f3a553070d23e5e633594d654 (patch) | |
tree | a4cb2925b7a804dfff9bc5440de41320cb62d6f0 | |
parent | a89581b22dad254ff1e888672c933856d9991c57 (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
-rw-r--r-- | src/osmo-bts-oc2g/misc/oc2gbts_mgr_calib.c | 4 |
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) |