From ffc10c8ac68e1ffd65f0faa8610c7c5f09078aa9 Mon Sep 17 00:00:00 2001 From: Henning Westerholt Date: Mon, 11 Feb 2019 21:15:57 +0100 Subject: [PATCH] core: fix related to e3ecad34bb1 in dst_blacklist.c, small whitespace change in ut.c --- src/core/dst_blacklist.c | 9 ++++----- src/core/ut.c | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/dst_blacklist.c b/src/core/dst_blacklist.c index 5259c34b04d..da2718c709a 100644 --- a/src/core/dst_blacklist.c +++ b/src/core/dst_blacklist.c @@ -164,13 +164,12 @@ static int init_blst_callback_lst(struct blst_callbacks_lst* cb_lst, int max) cb_lst->max_hooks=MAX_BLST_HOOKS; cb_lst->last_idx=0; cb_lst->hooks=pkg_malloc(cb_lst->max_hooks*sizeof(struct blacklist_hook)); - if (cb_lst->hooks==0) - PKG_MEM_ERROR; - goto error; + if (cb_lst->hooks==0) { + PKG_MEM_ERROR; + return -1; + } memset(cb_lst->hooks, 0, cb_lst->max_hooks*sizeof(struct blacklist_hook)); return 0; -error: - return -1; } diff --git a/src/core/ut.c b/src/core/ut.c index 77842c9cfd7..5ee8f34db11 100644 --- a/src/core/ut.c +++ b/src/core/ut.c @@ -160,7 +160,7 @@ char* as_asciiz(str* s) r = (char*)pkg_malloc(s->len + 1); if (!r) { - PKG_MEM_ERROR; + PKG_MEM_ERROR; return 0; } memcpy(r, s->s, s->len);