1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

s3:avahi: Fix size types

This fixes compilation with -Wstrict-overflow=2

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Andreas Schneider 2017-12-07 17:57:05 +01:00 committed by Jeremy Allison
parent 75c28a2642
commit eb0bdefd2d

View File

@ -108,7 +108,7 @@ static void avahi_client_callback(AvahiClient *c, AvahiClientState status,
case AVAHI_CLIENT_S_RUNNING: {
int snum;
int num_services = lp_numservices();
int dk = 0;
size_t dk = 0;
AvahiStringList *adisk = NULL;
AvahiStringList *adisk2 = NULL;
const char *hostname = NULL;
@ -154,7 +154,7 @@ static void avahi_client_callback(AvahiClient *c, AvahiClientState status,
lp_parm_bool(snum, "fruit", "time machine", false))
{
adisk2 = avahi_string_list_add_printf(
adisk, "dk%d=adVN=%s,adVF=0x82",
adisk, "dk%zu=adVN=%s,adVF=0x82",
dk++, lp_const_servicename(snum));
if (adisk2 == NULL) {
DBG_DEBUG("avahi_string_list_add_printf"