svc.c: Replace daemon-only logging API with API from err.h

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-02-10 10:19:00 +01:00
1 parent 0f64e18f27
commit d56031db7d
1 file changed
+3 -4
+3 -4
View File
@@ -22,6 +22,7 @@
* THE SOFTWARE.
*/
#include <err.h>
#include <ctype.h> /* isdigit() */
#include <stdlib.h>
#include <strings.h>
@@ -42,7 +43,7 @@ static svc_t *__connect_shm(void)
if (!list) {
/* This should never happen, but if it does we're probably
* knee-deep in more serious problems already... */
_e("Failed connecting to shared memory, error %d: %s", errno, strerror(errno));
warn("Failed connecting to shared memory, error %d", errno);
abort();
}
@@ -313,10 +314,8 @@ svc_t *svc_find(char *cmd, int id)
svc_t *svc;
for (svc = svc_iterator(1); svc; svc = svc_iterator(0)) {
if (svc->id == id && !strncmp(svc->cmd, cmd, strlen(svc->cmd))) {
_d("Found a matching svc for %s", cmd);
if (svc->id == id && !strncmp(svc->cmd, cmd, strlen(svc->cmd)))
return svc;
}
}
return NULL;