Drop unneeded casting of "entry" from struct cache_service
authorRafał Miłecki <rafal@milecki.pl>
Thu, 9 Mar 2017 13:01:27 +0000 (14:01 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Thu, 9 Mar 2017 13:02:56 +0000 (14:02 +0100)
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 <rafal@milecki.pl>
ubus.c

diff --git a/ubus.c b/ubus.c
index a74df6cf5682e9e1f5ab757ea0f39d3bf2da7c2c..9ceeab10bdeda184c1dbcfb6366b6b7a4d3cbcb7 100644 (file)
--- 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';