From 68e2135361d7bdfaeddc5ed83f70666b76507823 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 17 Jan 2022 15:59:38 -0600 Subject: [PATCH] asn1: Fix coverity warnings --- lib/asn1/template.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/asn1/template.c b/lib/asn1/template.c index 1d3bb0710..2a618f2f8 100644 --- a/lib/asn1/template.c +++ b/lib/asn1/template.c @@ -1901,8 +1901,6 @@ _asn1_length_open_type(const struct asn1_template *tbase, break; default: return 0; } - if (!typeid_is_int && !typeid_is_oid) - return 0; if (!(t->tt & A1_OS_OT_IS_ARRAY)) { struct heim_base_data *os = DPO(data, topentype->offset); @@ -2469,8 +2467,7 @@ _asn1_print_open_type(const struct asn1_template *t, /* object set template */ opentype_name); free(indents); indents = getindent(flags, indent + 1); - if (indents) - r = rk_strpoolprintf(r, "%s", indents ? indents : ""); + r = rk_strpoolprintf(r, "%s", indents ? indents : ""); for (i = 0; r && i < len; i++) { struct rk_strpool *r2 = NULL; char *s = NULL;;