From: Tomas Krizek Date: Wed, 24 Mar 2021 16:44:49 +0000 (+0100) Subject: utils/client/kresc.c: replace asserts X-Git-Tag: v5.4.0~18^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6a6db850a31a4cbd8644245d2d00ddedc749f70;p=thirdparty%2Fknot-resolver.git utils/client/kresc.c: replace asserts --- diff --git a/utils/client/kresc.c b/utils/client/kresc.c index 5ca963835..1c8615e76 100644 --- a/utils/client/kresc.c +++ b/utils/client/kresc.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ #include -#include #include #include #include @@ -325,10 +324,8 @@ static int init_tty(const char *path) //! Run a command on the daemon; return the answer or NULL on failure, puts answer length to out_len. static char *run_cmd(const char *cmd, size_t * out_len) { - if (!g_tty || !cmd) { - assert(false); + if (!g_tty || !cmd) return NULL; - } if (fprintf(g_tty, "%s", cmd) < 0 || fflush(g_tty)) return NULL; uint32_t len;