aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-11-23 23:09:18 -0800
committerGarrett D'Amore <garrett@damore.org>2020-11-23 23:09:18 -0800
commit5ea2a1845f3393e91d6d102a8a89f339dd24f467 (patch)
treed17d6cd87d1a540e50f2e996924d8e1c92e1c8f0 /src/transport
parentd1218d7309475193b53911667911c4f59a1a7752 (diff)
downloadnng-5ea2a1845f3393e91d6d102a8a89f339dd24f467.tar.gz
nng-5ea2a1845f3393e91d6d102a8a89f339dd24f467.tar.bz2
nng-5ea2a1845f3393e91d6d102a8a89f339dd24f467.zip
fixes #1358 nni_strtou64 and nni_strtox64 could be replaced with strtoull
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/zerotier/zerotier.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/transport/zerotier/zerotier.c b/src/transport/zerotier/zerotier.c
index c66a4b2c..896add29 100644
--- a/src/transport/zerotier/zerotier.c
+++ b/src/transport/zerotier/zerotier.c
@@ -1521,12 +1521,14 @@ zt_walk_moons(const char *path, void *arg)
{
zt_node * ztn = arg;
const char *bn = nni_file_basename(path);
+ char * end;
uint64_t moonid;
if (strncmp(bn, "moon.", 5) != 0) {
return (NNI_FILE_WALK_CONTINUE);
}
- if (nni_strtox64(bn + 5, &moonid) == 0) {
+ if (((moonid = (uint64_t) strtoull(bn + 5, &end, 16)) != 0) &&
+ (*end == '\0')) {
ZT_Node_orbit(ztn->zn_znode, NULL, moonid, 0);
}
return (NNI_FILE_WALK_CONTINUE);