mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-20 10:48:29 +00:00
Fix compiler warning.
This commit is contained in:
committed by
Simon Kelley
parent
0fbd980639
commit
f77700aa27
@@ -834,9 +834,12 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
|
|||||||
else
|
else
|
||||||
mess->siaddr = context->local;
|
mess->siaddr = context->local;
|
||||||
|
|
||||||
|
if (strchr(service->basename, '.'))
|
||||||
snprintf((char *)mess->file, sizeof(mess->file),
|
snprintf((char *)mess->file, sizeof(mess->file),
|
||||||
strchr(service->basename, '.') ? "%s" :"%s.%d",
|
"%s.%d", service->basename, layer);
|
||||||
service->basename, layer);
|
else
|
||||||
|
snprintf((char *)mess->file, sizeof(mess->file),
|
||||||
|
"%s", service->basename);
|
||||||
|
|
||||||
option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK);
|
option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK);
|
||||||
option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, htonl(context->local.s_addr));
|
option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, htonl(context->local.s_addr));
|
||||||
|
|||||||
Reference in New Issue
Block a user