From: Vladimír Čunát Date: Mon, 5 Mar 2018 14:51:41 +0000 (+0100) Subject: lib/zonecut: nitpicks in kr_zonecut_has_glue() X-Git-Tag: v2.3.0~21^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5cfcb7927bded89569c3f01a4752911daebc8c30;p=thirdparty%2Fknot-resolver.git lib/zonecut: nitpicks in kr_zonecut_has_glue() --- diff --git a/lib/zonecut.c b/lib/zonecut.c index dacf3f266..9645b018e 100644 --- a/lib/zonecut.c +++ b/lib/zonecut.c @@ -254,12 +254,14 @@ static int has_glue(const char *k, void *v, void *baton) { bool *glue_found = (bool *)baton; if (*glue_found) { - return kr_ok(); + assert(false); + return 1; /* short-circuit */ } pack_t *pack = (pack_t *)v; if (pack != NULL && pack->len != 0) { *glue_found = true; + return 1; /* short-circuit */ } return kr_ok(); diff --git a/lib/zonecut.h b/lib/zonecut.h index b14dfda30..d36f9f2b1 100644 --- a/lib/zonecut.h +++ b/lib/zonecut.h @@ -156,5 +156,4 @@ int kr_zonecut_find_cached(struct kr_context *ctx, struct kr_zonecut *cut, * @param cut zone cut to check * @return true/false */ -KR_EXPORT bool kr_zonecut_has_glue(struct kr_zonecut *cut);