summaryrefslogtreecommitdiff
path: root/libdane
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-07-22 18:30:13 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-07-22 18:30:13 +0200
commit4e43d2183d3be756f24df22e8fbc4fe2d816024d (patch)
tree1f6d2fab5884aca9e4ae031403322239d2f31a3b /libdane
parent18bd67731599cdf64e1ad457da73916b5a74c2bd (diff)
downloadgnutls-4e43d2183d3be756f24df22e8fbc4fe2d816024d.tar.gz
libdane: simplified initialization of variables.
Diffstat (limited to 'libdane')
-rw-r--r--libdane/dane.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/libdane/dane.c b/libdane/dane.c
index ad9af867e2..8c8ab35f44 100644
--- a/libdane/dane.c
+++ b/libdane/dane.c
@@ -164,26 +164,21 @@ dane_query_to_raw_tlsa(dane_query_t q, unsigned int *data_entries,
unsigned int idx;
*data_entries = 0;
- if (bogus)
- *bogus = 0;
- if (secure)
- *secure = 0;
*dane_data = NULL;
*dane_data_len = NULL;
- switch (q->status) {
- case DANE_QUERY_DNSSEC_VERIFIED:
- if (secure)
+ if (secure) {
+ if (q->status & DANE_QUERY_DNSSEC_VERIFIED)
*secure = 1;
- break;
+ else
+ *secure = 0;
+ }
- case DANE_QUERY_BOGUS:
- if (bogus)
+ if (bogus) {
+ if (q->status & DANE_QUERY_BOGUS)
*bogus = 1;
- break;
-
- default:
- break;
+ else
+ *bogus = 0;
}
/* pack dane_data pointer list followed by dane_data contents */