From: Arran Cudbard-Bell Date: Wed, 1 Dec 2021 20:23:44 +0000 (-0600) Subject: Return NULL not -1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a29680525f6b24ec7a9b5a2a3fa3432cef098b04;p=thirdparty%2Ffreeradius-server.git Return NULL not -1 --- diff --git a/src/lib/unlang/xlat_inst.c b/src/lib/unlang/xlat_inst.c index 97dc9ff8fb1..a85d1e6d35b 100644 --- a/src/lib/unlang/xlat_inst.c +++ b/src/lib/unlang/xlat_inst.c @@ -412,7 +412,7 @@ void xlat_thread_detach(void) */ static int xlat_instantiate_init(void) { - if (unlikely(xlat_inst_tree)) return 0; + if (unlikely(xlat_inst_tree != NULL)) return 0; xlat_inst_tree = fr_heap_talloc_alloc(NULL, _xlat_inst_cmp, xlat_inst_t, idx, 0); if (!xlat_inst_tree) return -1; diff --git a/src/lib/unlang/xlat_tokenize.c b/src/lib/unlang/xlat_tokenize.c index 0fc8a1eead3..265316f5060 100644 --- a/src/lib/unlang/xlat_tokenize.c +++ b/src/lib/unlang/xlat_tokenize.c @@ -170,7 +170,7 @@ xlat_exp_t *xlat_exp_func_alloc(TALLOC_CTX *ctx, xlat_t *func, xlat_exp_t const node->call.func = func; if (unlikely(xlat_copy(node, &node->child, args) < 0)) { talloc_free(node); - return -1; + return NULL; } node->flags = func->flags;