OpenWrt – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | From 4bf62f616b82fad7a7f91195b0204dd64d79a35c Mon Sep 17 00:00:00 2001 |
2 | From: Simon Kelley <simon@thekelleys.org.uk> |
||
3 | Date: Thu, 10 Jan 2019 21:54:22 +0000 |
||
4 | Subject: [PATCH 28/32] Tidy cache_blockdata_free() |
||
5 | |||
6 | Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> |
||
7 | --- |
||
8 | src/cache.c | 15 +++++++++------ |
||
9 | 1 file changed, 9 insertions(+), 6 deletions(-) |
||
10 | |||
11 | --- a/src/cache.c |
||
12 | +++ b/src/cache.c |
||
13 | @@ -200,14 +200,17 @@ static void cache_hash(struct crec *crec |
||
14 | |||
15 | static void cache_blockdata_free(struct crec *crecp) |
||
16 | { |
||
17 | - if (crecp->flags & F_SRV && !(crecp->flags & F_NEG)) |
||
18 | - blockdata_free(crecp->addr.srv.target); |
||
19 | + if (!(crecp->flags & F_NEG)) |
||
20 | + { |
||
21 | + if (crecp->flags & F_SRV) |
||
22 | + blockdata_free(crecp->addr.srv.target); |
||
23 | #ifdef HAVE_DNSSEC |
||
24 | - else if (crecp->flags & F_DNSKEY) |
||
25 | - blockdata_free(crecp->addr.key.keydata); |
||
26 | - else if ((crecp->flags & F_DS) && !(crecp->flags & F_NEG)) |
||
27 | - blockdata_free(crecp->addr.ds.keydata); |
||
28 | + else if (crecp->flags & F_DNSKEY) |
||
29 | + blockdata_free(crecp->addr.key.keydata); |
||
30 | + else if (crecp->flags & F_DS) |
||
31 | + blockdata_free(crecp->addr.ds.keydata); |
||
32 | #endif |
||
33 | + } |
||
34 | } |
||
35 | |||
36 | static void cache_free(struct crec *crecp) |