1
0
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:
Yu Watanabe 2023-08-09 05:04:07 +09:00
parent 6eb151e989
commit 7b1fac1e52
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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;
}