aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2015-06-10 20:20:53 +0200
committerRickard Green <[email protected]>2015-06-10 20:20:53 +0200
commit6347ee34c81a136055182367905647588a3947bf (patch)
treef32501057f49cd2b33c8742a579319a03baacbe2 /erts
parentf35bbd90e3b6a9151169f6df716e56086eeb379e (diff)
parente6fce01ceb4e9ad27aade58f69857a5d9eb0d734 (diff)
downloadotp-6347ee34c81a136055182367905647588a3947bf.tar.gz
otp-6347ee34c81a136055182367905647588a3947bf.tar.bz2
otp-6347ee34c81a136055182367905647588a3947bf.zip
Merge branch 'rickard/delayed-delete-node/OTP-12802'
* rickard/delayed-delete-node/OTP-12802: Fix error checking for +zdntgc flag
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_init.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index 421c6670c6..6128bda18f 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -2031,10 +2031,12 @@ erl_start(int argc, char **argv)
if (sys_strcmp(arg, "infinity") == 0)
secs = ERTS_NODE_TAB_DELAY_GC_INFINITY;
else {
+ char *endptr;
errno = 0;
- secs = strtol(arg, NULL, 10);
- if (errno != 0 || secs < 0 || ERTS_NODE_TAB_DELAY_GC_MAX < secs) {
- erts_fprintf(stderr, "Invalid delayed node table gc: %ld\n", secs);
+ secs = strtol(arg, &endptr, 10);
+ if (errno != 0 || *arg == '\0' || *endptr != '\0'
+ || secs < 0 || ERTS_NODE_TAB_DELAY_GC_MAX < secs) {
+ erts_fprintf(stderr, "Invalid delayed node table gc: %s\n", arg);
erts_usage();
}
}