X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fsubnet.c;fp=src%2Fsubnet.c;h=81dae5f3a6b6a0f257e3011036d01015915320ed;hp=b4c79139f81534c6a9421ef6d551e67f4f8c6150;hb=99763e34d52fcfe76b0bb9c7f3a17ace51cfdbfc;hpb=d2f8d0920226e4d8edd3efa3c18b46b783aacea0 diff --git a/src/subnet.c b/src/subnet.c index b4c79139..81dae5f3 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -387,7 +387,7 @@ bool str2net(subnet_t *subnet, const char *subnetstr) { bool net2str(char *netstr, int len, const subnet_t *subnet) { if(!netstr || !subnet) { - logger(LOG_ERR, "net2str() was called with netstr=%p, subnet=%p!", netstr, subnet); + logger(LOG_ERR, "net2str() was called with netstr=%p, subnet=%p!", (void *)netstr, (void *)subnet); return false; } @@ -592,9 +592,9 @@ void subnet_update(node_t *owner, subnet_t *subnet, bool up) { // Prepare environment variables to be passed to the script - 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", owner->name); xasprintf(&envp[4], "NAME=%s", myself->name);