Commit 5cfcb792 authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Petr Špaček

lib/zonecut: nitpicks in kr_zonecut_has_glue()

parent f67756a7
...@@ -254,12 +254,14 @@ static int has_glue(const char *k, void *v, void *baton) ...@@ -254,12 +254,14 @@ static int has_glue(const char *k, void *v, void *baton)
{ {
bool *glue_found = (bool *)baton; bool *glue_found = (bool *)baton;
if (*glue_found) { if (*glue_found) {
return kr_ok(); assert(false);
return 1; /* short-circuit */
} }
pack_t *pack = (pack_t *)v; pack_t *pack = (pack_t *)v;
if (pack != NULL && pack->len != 0) { if (pack != NULL && pack->len != 0) {
*glue_found = true; *glue_found = true;
return 1; /* short-circuit */
} }
return kr_ok(); return kr_ok();
......
...@@ -156,5 +156,4 @@ int kr_zonecut_find_cached(struct kr_context *ctx, struct kr_zonecut *cut, ...@@ -156,5 +156,4 @@ int kr_zonecut_find_cached(struct kr_context *ctx, struct kr_zonecut *cut,
* @param cut zone cut to check * @param cut zone cut to check
* @return true/false * @return true/false
*/ */
KR_EXPORT
bool kr_zonecut_has_glue(struct kr_zonecut *cut); bool kr_zonecut_has_glue(struct kr_zonecut *cut);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment