aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/encoding/parser.c
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2011-11-17 11:27:55 +0100
committerMartin Willi <martin@revosec.ch>2012-03-20 17:30:42 +0100
commite9b55b832546d05f464bdddbe779ed21cd17b624 (patch)
tree375064023de39c892823be79795c09aa8cd1e2d9 /src/libcharon/encoding/parser.c
parent683d83ed3ef6c920a59f6d23d0f44c66fc6ded42 (diff)
downloadstrongswan-e9b55b832546d05f464bdddbe779ed21cd17b624.tar.bz2
strongswan-e9b55b832546d05f464bdddbe779ed21cd17b624.tar.xz
Simplify signature of get_encoding_rules(), make all rules static
Diffstat (limited to 'src/libcharon/encoding/parser.c')
-rw-r--r--src/libcharon/encoding/parser.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libcharon/encoding/parser.c b/src/libcharon/encoding/parser.c
index 86ab212b8..4736873a7 100644
--- a/src/libcharon/encoding/parser.c
+++ b/src/libcharon/encoding/parser.c
@@ -363,11 +363,10 @@ METHOD(parser_t, parse_payload, status_t,
{
payload_t *pld;
void *output;
- size_t rule_count;
int payload_length = 0, spi_size = 0, attribute_length = 0;
u_int16_t ts_type = 0;
bool attribute_format = FALSE;
- int rule_number;
+ int rule_number, rule_count;
encoding_rule_t *rule;
/* create instance of the payload to parse */
@@ -383,7 +382,7 @@ METHOD(parser_t, parse_payload, status_t,
output = pld;
/* parse the payload with its own rulse */
- pld->get_encoding_rules(pld, &this->rules, &rule_count);
+ rule_count = pld->get_encoding_rules(pld, &this->rules);
for (rule_number = 0; rule_number < rule_count; rule_number++)
{
rule = &(this->rules[rule_number]);