diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2011-05-12 19:24:55 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2011-05-12 19:24:55 +0000 |
commit | 9dacc3d6a109681326def7b82f9ebc54e79d3ebd (patch) | |
tree | fe0d8423d1eda24c316d9632bde3c8dfd87347af /epan/dissectors/packet-dns.c | |
parent | 3c274a3bfef7398b8a2a67afbc80d64aa60947aa (diff) |
Use rcode instead of repeated uses of "flags & F_RCODE". One change submitted
from Yaniv Kaul via bug 5858; the other 2 from me.
svn path=/trunk/; revision=37097
Diffstat (limited to 'epan/dissectors/packet-dns.c')
-rw-r--r-- | epan/dissectors/packet-dns.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-dns.c b/epan/dissectors/packet-dns.c index 3fb8249d5f..d8cb21fbb0 100644 --- a/epan/dissectors/packet-dns.c +++ b/epan/dissectors/packet-dns.c @@ -3105,10 +3105,10 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, (flags&F_RESPONSE)?" response":"")); if (flags & F_RESPONSE) { - if ((flags & F_RCODE) != RCODE_NOERROR) { + if (rcode != RCODE_NOERROR) { bufpos+=MIN(MAX_BUF_SIZE-bufpos, g_snprintf(buf+bufpos, MAX_BUF_SIZE-bufpos, ", %s", - val_to_str(flags & F_RCODE, rcode_vals, "Unknown error (%u)"))); + val_to_str(rcode, rcode_vals, "Unknown error (%u)"))); } } col_add_str(pinfo->cinfo, COL_INFO, buf); @@ -3218,7 +3218,7 @@ dissect_dns_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (flags & F_RESPONSE) { bufpos+=MIN(MAX_BUF_SIZE-bufpos, g_snprintf(buf+bufpos, MAX_BUF_SIZE-bufpos, " response, %s", - val_to_str(flags & F_RCODE, rcode_vals, "Unknown error"))); + val_to_str(rcode, rcode_vals, "Unknown error"))); } tf = proto_tree_add_uint_format(dns_tree, hf_dns_flags, tvb, offset + DNS_FLAGS, 2, |