From: Guus Sliepen Date: Fri, 8 Aug 2014 14:09:01 +0000 (+0200) Subject: Fix a compiler warning. X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=3e803945761718a5310866b463cc0807bf85a597;p=meshlink Fix a compiler warning. --- 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);