diff options
author | Michael Brown <mcb30@ipxe.org> | 2013-12-03 16:48:56 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2013-12-05 00:37:02 +0000 |
commit | 22001cb206c1320aee27f679a63d2171d35e99c5 (patch) | |
tree | a972bb914371a68d4925dcc007238dcb836546ba /src/net/udp/dhcpv6.c | |
parent | a2638a8edd28e15d90435a0b1aed9b3215666aa4 (diff) | |
download | ipxe-22001cb206c1320aee27f679a63d2171d35e99c5.tar.gz |
[settings] Explicitly separate the concept of a completed fetched setting
The fetch_setting() family of functions may currently modify the
definition of the specified setting (e.g. to add missing type
information). Clean up this interface by requiring callers to provide
an explicit buffer to contain the completed definition of the fetched
setting, if required.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/udp/dhcpv6.c')
-rw-r--r-- | src/net/udp/dhcpv6.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net/udp/dhcpv6.c b/src/net/udp/dhcpv6.c index 42d11194f..7bed83d92 100644 --- a/src/net/udp/dhcpv6.c +++ b/src/net/udp/dhcpv6.c @@ -256,7 +256,7 @@ static int dhcpv6_iaaddr ( struct dhcpv6_option_list *options, uint32_t iaid, */ /** DHCPv6 settings scope */ -static struct settings_scope dhcpv6_settings_scope; +static const struct settings_scope dhcpv6_settings_scope; /** A DHCPv6 settings block */ struct dhcpv6_settings { @@ -276,7 +276,7 @@ struct dhcpv6_settings { * @ret applies Setting applies within this settings block */ static int dhcpv6_applies ( struct settings *settings __unused, - struct setting *setting ) { + const struct setting *setting ) { return ( setting->scope == &dhcpv6_settings_scope ); } @@ -543,7 +543,7 @@ static size_t dhcpv6_user_class ( void *data, size_t len ) { int actual_len; /* Fetch user-class setting, if defined */ - actual_len = fetch_setting ( NULL, &user_class_setting, data, len ); + actual_len = fetch_raw_setting ( NULL, &user_class_setting, data, len ); if ( actual_len >= 0 ) return actual_len; |