aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/zerotier/zerotier.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/transport/zerotier/zerotier.c b/src/transport/zerotier/zerotier.c
index 0b0303d9..95fedc0d 100644
--- a/src/transport/zerotier/zerotier.c
+++ b/src/transport/zerotier/zerotier.c
@@ -1529,14 +1529,12 @@ zt_walk_moons(const char *path, void *arg)
{
zt_node * ztn = arg;
const char *bn = nni_file_basename(path);
- char * ep;
uint64_t moonid;
if (strncmp(bn, "moon.", 5) != 0) {
return (NNI_FILE_WALK_CONTINUE);
}
- moonid = strtoull(bn + 5, &ep, 16);
- if (*ep == '\0') {
+ if (nni_strtox64(bn + 5, &moonid) == 0) {
ZT_Node_orbit(ztn->zn_znode, NULL, moonid, 0);
}
return (NNI_FILE_WALK_CONTINUE);