mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
dhcp: rename function argument
This commit is contained in:
parent
6eb151e989
commit
7b1fac1e52
@ -57,7 +57,7 @@ int dhcp_option_remove_option(uint8_t *options, size_t buflen, uint8_t option_co
|
||||
typedef int (*dhcp_option_callback_t)(uint8_t code, uint8_t len,
|
||||
const void *option, void *userdata);
|
||||
|
||||
int dhcp_option_parse(DHCPMessage *message, size_t len, dhcp_option_callback_t cb, void *userdata, char **error_message);
|
||||
int dhcp_option_parse(DHCPMessage *message, size_t len, dhcp_option_callback_t cb, void *userdata, char **ret_error_message);
|
||||
|
||||
int dhcp_option_parse_string(const uint8_t *option, size_t len, char **ret);
|
||||
|
||||
|
@ -355,7 +355,7 @@ static int parse_options(const uint8_t options[], size_t buflen, uint8_t *overlo
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dhcp_option_parse(DHCPMessage *message, size_t len, dhcp_option_callback_t cb, void *userdata, char **_error_message) {
|
||||
int dhcp_option_parse(DHCPMessage *message, size_t len, dhcp_option_callback_t cb, void *userdata, char **ret_error_message) {
|
||||
_cleanup_free_ char *error_message = NULL;
|
||||
uint8_t overload = 0;
|
||||
uint8_t message_type = 0;
|
||||
@ -388,8 +388,8 @@ int dhcp_option_parse(DHCPMessage *message, size_t len, dhcp_option_callback_t c
|
||||
if (message_type == 0)
|
||||
return -ENOMSG;
|
||||
|
||||
if (_error_message && IN_SET(message_type, DHCP_NAK, DHCP_DECLINE))
|
||||
*_error_message = TAKE_PTR(error_message);
|
||||
if (ret_error_message && IN_SET(message_type, DHCP_NAK, DHCP_DECLINE))
|
||||
*ret_error_message = TAKE_PTR(error_message);
|
||||
|
||||
return message_type;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user