minor changes

This commit is contained in:
Meredith L. Patterson 2012-05-26 19:15:56 +02:00
parent 8e9c480a45
commit 8d74686a7e
2 changed files with 9 additions and 8 deletions

View file

@ -388,7 +388,7 @@ const HParser* init_parser() {
h_int_range(h_uint16(), 255, 255), h_int_range(h_uint16(), 255, 255),
NULL); NULL);
const HParser *dns_question = h_sequence(h_sequence(h_many1(h_length_value(h_uint8(), const HParser *dns_question = h_sequence(h_sequence(h_many1(h_length_value(h_int_range(h_uint8(), 1, 255),
h_uint8())), h_uint8())),
h_ch('\x00'), h_ch('\x00'),
NULL), // QNAME NULL), // QNAME
@ -405,12 +405,13 @@ const HParser* init_parser() {
NULL); NULL);
dns_message = (HParser*)h_attr_bool(h_sequence(dns_header, dns_message = (HParser*)h_action(h_attr_bool(h_sequence(dns_header,
h_many(dns_question), h_many(dns_question),
h_many(dns_rr), h_many(dns_rr),
h_end_p(), h_end_p(),
NULL), NULL),
validate_dns); validate_dns),
pack_dns_struct);
return dns_message; return dns_message;
} }

View file

@ -229,7 +229,7 @@ const HParser* h_action(const HParser* p, const HAction a);
* *
* Result token type: TT_UINT * Result token type: TT_UINT
*/ */
const HParser* h_not_in(const uint8_t *charset, int length); const HParser* h_not_in(const uint8_t *charset, size_t length);
/** /**
* A no-argument parser that succeeds if there is no more input to * A no-argument parser that succeeds if there is no more input to