From ba107816b5e5ade315bd66e5eba8b54dc97484e4 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 27 Feb 2014 09:52:36 +0100 Subject: s4:libcli/resolve: avoid some const warnings Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- source4/libcli/resolve/nbtlist.c | 2 +- source4/libcli/resolve/wins.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source4/libcli/resolve/nbtlist.c b/source4/libcli/resolve/nbtlist.c index 64d72bcc51..13f38ff8ea 100644 --- a/source4/libcli/resolve/nbtlist.c +++ b/source4/libcli/resolve/nbtlist.c @@ -111,7 +111,7 @@ struct composite_context *resolve_name_nbtlist_send(TALLOC_CTX *mem_ctx, uint32_t flags, uint16_t port, struct nbt_name *name, - const char **address_list, + const char * const *address_list, struct interface *ifaces, uint16_t nbt_port, int nbt_timeout, diff --git a/source4/libcli/resolve/wins.c b/source4/libcli/resolve/wins.c index a52b99a23e..541d3fe5db 100644 --- a/source4/libcli/resolve/wins.c +++ b/source4/libcli/resolve/wins.c @@ -27,7 +27,7 @@ #include "lib/socket/netif.h" struct resolve_wins_data { - const char **address_list; + char **address_list; struct interface *ifaces; uint16_t nbt_port; int nbt_timeout; @@ -47,7 +47,8 @@ struct composite_context *resolve_name_wins_send( struct resolve_wins_data *wins_data = talloc_get_type(userdata, struct resolve_wins_data); if (wins_data->address_list == NULL) return NULL; return resolve_name_nbtlist_send(mem_ctx, event_ctx, flags, port, name, - wins_data->address_list, wins_data->ifaces, + (const char * const *)wins_data->address_list, + wins_data->ifaces, wins_data->nbt_port, wins_data->nbt_timeout, false, true); } @@ -66,7 +67,7 @@ NTSTATUS resolve_name_wins_recv(struct composite_context *c, bool resolve_context_add_wins_method(struct resolve_context *ctx, const char **address_list, struct interface *ifaces, uint16_t nbt_port, int nbt_timeout) { struct resolve_wins_data *wins_data = talloc(ctx, struct resolve_wins_data); - wins_data->address_list = (const char **)str_list_copy(wins_data, address_list); + wins_data->address_list = str_list_copy(wins_data, address_list); wins_data->ifaces = talloc_reference(wins_data, ifaces); wins_data->nbt_port = nbt_port; wins_data->nbt_timeout = nbt_timeout; -- cgit