diff options
-rw-r--r-- | helper.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -88,6 +88,8 @@ static void helper_printavaInt(struct AttributeValueAssertion* a,const char* rel printf("[%.*s %s", (int)a->desc.l, a->desc.s, rel); if (a->value.l != 0 && a->value.s != NULL) { printf(" %.*s]", (int)a->value.l,a->value.s); + } else { + putchar(']'); } } @@ -111,17 +113,20 @@ void helper_printal(struct AttributeDescriptionList* a) static void helper_printfilterInt(struct Filter* f) { + if (f == NULL) { + printf("(nullfilter)"); + return; + } switch (f->type) { case AND: printf("&("); mergesub: helper_printfilterInt(f->x); - printf(")"); + putchar(')'); break; case OR: printf("|("); goto mergesub; - break; case NOT: printf("!("); goto mergesub; @@ -162,6 +167,7 @@ mergesub: helper_printavaInt(&f->ava,"<="); break; case PRESENT: + f->ava.value.l = 0; helper_printavaInt(&f->ava,"\\exist"); break; case APPROX: |