Simplify signature of get_encoding_rules(), make all rules static
This commit is contained in:
@@ -79,7 +79,7 @@ struct private_delete_payload_t {
|
||||
* The defined offsets are the positions in a object of type
|
||||
* private_delete_payload_t.
|
||||
*/
|
||||
encoding_rule_t delete_payload_encodings[] = {
|
||||
static encoding_rule_t encodings[] = {
|
||||
/* 1 Byte next payload type, stored in the field next_payload */
|
||||
{ U_INT_8, offsetof(private_delete_payload_t, next_payload) },
|
||||
/* the critical bit */
|
||||
@@ -145,11 +145,11 @@ METHOD(payload_t, verify, status_t,
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
METHOD(payload_t, get_encoding_rules, void,
|
||||
private_delete_payload_t *this, encoding_rule_t **rules, size_t *rule_count)
|
||||
METHOD(payload_t, get_encoding_rules, int,
|
||||
private_delete_payload_t *this, encoding_rule_t **rules)
|
||||
{
|
||||
*rules = delete_payload_encodings;
|
||||
*rule_count = countof(delete_payload_encodings);
|
||||
*rules = encodings;
|
||||
return countof(encodings);
|
||||
}
|
||||
|
||||
METHOD(payload_t, get_payload_type, payload_type_t,
|
||||
|
||||
Reference in New Issue
Block a user