From 4848354bb90360e8895e15bb5ca74913155c4bcc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Tue, 11 Oct 2016 12:05:17 +0200
Subject: Get rid of the remaining FAILs
---
zyklonb.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
(limited to 'zyklonb.c')
diff --git a/zyklonb.c b/zyklonb.c
index 53cb6f3..5f73105 100644
--- a/zyklonb.c
+++ b/zyklonb.c
@@ -1028,11 +1028,17 @@ plugin_launch (struct bot_context *ctx, const char *name, struct error **e)
{
const char *plugin_dir = str_map_find (&ctx->config, "plugin_dir");
if (!plugin_dir)
- FAIL ("plugin directory not set");
+ {
+ error_set (e, "plugin directory not set");
+ return NULL;
+ }
int stdin_pipe[2];
if (pipe (stdin_pipe) == -1)
- FAIL ("%s: %s", "pipe", strerror (errno));
+ {
+ error_set (e, "%s: %s", "pipe", strerror (errno));
+ return NULL;
+ }
int stdout_pipe[2];
if (pipe (stdout_pipe) == -1)
--
cgit v1.2.3