]> git.meshlink.io Git - meshlink/commitdiff
Fix a compiler warning.
authorGuus Sliepen <guus@meshlink.io>
Fri, 8 Aug 2014 14:09:01 +0000 (16:09 +0200)
committerGuus Sliepen <guus@meshlink.io>
Fri, 8 Aug 2014 14:09:01 +0000 (16:09 +0200)
src/node.c

index edf2c85809134bc55581b7a9b5d46d562c2be663..057acb274b5d25514d3e515ec9eb3e8b8fd6b2ee 100644 (file)
@@ -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);