From 3e803945761718a5310866b463cc0807bf85a597 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 8 Aug 2014 16:09:01 +0200 Subject: [PATCH] Fix a compiler warning. --- src/node.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/node.c b/src/node.c index edf2c858..057acb27 100644 --- a/src/node.c +++ b/src/node.c @@ -105,10 +105,8 @@ void node_del(meshlink_handle_t *mesh, node_t *n) { } node_t *lookup_node(meshlink_handle_t *mesh, const char *name) { - node_t n = {NULL}; - node_t* result; - - n.name = name; + const node_t n = {.name = (char *)name}; + node_t *result; pthread_mutex_lock(&(mesh->nodes_mutex)); result = splay_search(mesh->nodes, &n); -- 2.39.2