summaryrefslogtreecommitdiffstats
path: root/test/btree_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-07-02 13:51:45 -0400
committerDavid Robillard <d@drobilla.net>2021-07-17 19:58:17 -0400
commitbc264ab6f58177124d49a72b4a808eb97fa2cb25 (patch)
treedf1a2233cd9e0953fa8e3fb44a673e8f1d74091d /test/btree_test.c
parentf25db1394f728aa9711a7882054c255335e74c80 (diff)
downloadzix-bc264ab6f58177124d49a72b4a808eb97fa2cb25.tar.gz
zix-bc264ab6f58177124d49a72b4a808eb97fa2cb25.tar.bz2
zix-bc264ab6f58177124d49a72b4a808eb97fa2cb25.zip
Avoid use of atoi() and atol()
Diffstat (limited to 'test/btree_test.c')
-rw-r--r--test/btree_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/btree_test.c b/test/btree_test.c
index d4dd6b4..ccb0cbc 100644
--- a/test/btree_test.c
+++ b/test/btree_test.c
@@ -527,10 +527,10 @@ main(int argc, char** argv)
return EXIT_FAILURE;
}
- const unsigned n_tests = 3;
- unsigned n_elems = (argc > 1) ? (unsigned)atol(argv[1]) : 524288u;
+ const unsigned n_tests = 3u;
+ const size_t n_elems = (argc > 1) ? strtoul(argv[1], NULL, 10) : 524288u;
- printf("Running %u tests with %u elements", n_tests, n_elems);
+ printf("Running %u tests with %lu elements", n_tests, n_elems);
for (unsigned i = 0; i < n_tests; ++i) {
printf(".");
fflush(stdout);