aboutsummaryrefslogtreecommitdiffstats
path: root/src/evmgr.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2019-04-02 09:48:50 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2019-04-02 09:53:18 +0200
commit8214e88a036ca06a9a2ba2348e99df4de8bb8940 (patch)
treece9488dd34a4d7c21741c66aa43b8f48b8bc94eb /src/evmgr.c
parent84f4aec41817417a3b94d91da1b9b2fba9711e40 (diff)
evmgr: Fix a "maybe uninitialized" issue
The warning maybe-uninitialized is emited only when the optimisation level is greater than 0. For this reason, the error was not discovered development process. The build config is tuned to detect that error and the error is fixed. Change-Id: I14c8ffe6daa3d498268cfadeab20300895b3360e Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/evmgr.c')
-rw-r--r--src/evmgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/evmgr.c b/src/evmgr.c
index 2dc35e42..557a9f3a 100644
--- a/src/evmgr.c
+++ b/src/evmgr.c
@@ -185,13 +185,14 @@ int evmgr_create(struct evmgr **result)
/* creates the eventfd for waking up polls */
evmgr->efd = eventfd(0, EFD_CLOEXEC|EFD_SEMAPHORE);
if (evmgr->efd < 0) {
- ERROR("can't make eventfd for events");
rc = -errno;
+ ERROR("can't make eventfd for events");
goto error1;
}
/* create the systemd event loop */
evmgr->sdev = systemd_get_event_loop();
if (!evmgr->sdev) {
+ rc = -errno;
ERROR("can't make new event loop");
goto error2;
}