]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/zonecut: nitpicks in kr_zonecut_has_glue()
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 5 Mar 2018 14:51:41 +0000 (15:51 +0100)
committerPetr Špaček <petr.spacek@nic.cz>
Fri, 6 Apr 2018 13:20:31 +0000 (15:20 +0200)
lib/zonecut.c
lib/zonecut.h

index dacf3f2669273632abc52ba6a71c37e5f559f34e..9645b018eb61c2dcb7f19cb0049456cc5b4a7604 100644 (file)
@@ -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();
index b14dfda30fa3284333aab331937a6d99ecd214aa..d36f9f2b1f728b1e66e3c468619fb9b1b3a5d838 100644 (file)
@@ -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);