hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 5976c419f06ff31321efbede90786d6595861caf
parent 5a8b05d4b148dd594e5dca27ba1c18d38883a4fb
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 23 Jun 2021 12:17:40 -0400

net::dns: simplify decoder type, make private

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Mnet/dns/decode.ha | 10+---------
1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/net/dns/decode.ha b/net/dns/decode.ha @@ -4,13 +4,9 @@ use fmt; use net::ip; use strings; -export type decoder = struct { +type decoder = struct { buf: []u8, cur: []u8, - qdcount: u16, - ancount: u16, - nscount: u16, - arcount: u16, }; // Decodes a DNS message, heap allocating the resources necessary to represent @@ -75,10 +71,6 @@ fn decode_header(dec: *decoder, head: *header) (void | format) = { head.ancount = decode_u16(dec)?; head.nscount = decode_u16(dec)?; head.arcount = decode_u16(dec)?; - dec.qdcount = head.qdcount; - dec.ancount = head.ancount; - dec.nscount = head.nscount; - dec.arcount = head.arcount; }; fn op_decode(in: u16, out: *op) void = {