Fix all warnings when compiling with -Wall -W -pedantic.
[oweals/tinc.git] / src / graph.c
index 832e017..3529d01 100644 (file)
@@ -274,9 +274,9 @@ static void sssp_bfs(void) {
                                n->mtuevent = NULL;
                        }
 
-                       xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
-                       xasprintf(&envp[1], "DEVICE=%s", device ? : "");
-                       xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
+                       xasprintf(&envp[0], "NETNAME=%s", netname ? netname : "");
+                       xasprintf(&envp[1], "DEVICE=%s", device ? device : "");
+                       xasprintf(&envp[2], "INTERFACE=%s", iface ? iface : "");
                        xasprintf(&envp[3], "NODE=%s", n->name);
                        sockaddr2str(&n->address, &address, &port);
                        xasprintf(&envp[4], "REMOTEADDRESS=%s", address);