From: Rafał Miłecki Date: Thu, 9 Mar 2017 13:01:27 +0000 (+0100) Subject: Drop unneeded casting of "entry" from struct cache_service X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmdnsd.git;a=commitdiff_plain;h=e985074edacf30012e360f7cc745e070ce997141 Drop unneeded casting of "entry" from struct cache_service Since commit 819b909b82e4 ("cache: constify entry and host pointers in struct cache_entry") it is "const char *" so we don't need to cast it. Signed-off-by: Rafał Miłecki --- diff --git a/ubus.c b/ubus.c index a74df6c..9ceeab1 100644 --- a/ubus.c +++ b/ubus.c @@ -71,7 +71,7 @@ umdns_browse(struct ubus_context *ctx, struct ubus_object *obj, if (!c1) { c1 = blobmsg_open_table(&b, buffer); } - snprintf(buffer, MAX_NAME_LEN, "%s", (const char *) s->entry); + snprintf(buffer, MAX_NAME_LEN, "%s", s->entry); local = strstr(buffer, "._"); if (local) *local = '\0'; @@ -105,7 +105,7 @@ umdns_hosts(struct ubus_context *ctx, struct ubus_object *obj, char *local; if (!cache_service_is_host(s)) continue; - snprintf(buffer, MAX_NAME_LEN, "%s", (const char *) s->entry); + snprintf(buffer, MAX_NAME_LEN, "%s", s->entry); local = strstr(buffer, "._"); if (local) *local = '\0';