- xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
- xasprintf(&envp[1], "DEVICE=%s", device ? : "");
- xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
- xasprintf(&envp[3], "NODE=%s", owner->name);
+ int n = 0;
+ xasprintf(&envp[n++], "NETNAME=%s", netname ? : "");
+ xasprintf(&envp[n++], "DEVICE=%s", device ? : "");
+ xasprintf(&envp[n++], "INTERFACE=%s", iface ? : "");
+ xasprintf(&envp[n++], "NODE=%s", owner->name);