diff options
author | David Robillard <d@drobilla.net> | 2021-07-02 13:51:45 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-07-17 19:58:17 -0400 |
commit | bc264ab6f58177124d49a72b4a808eb97fa2cb25 (patch) | |
tree | df1a2233cd9e0953fa8e3fb44a673e8f1d74091d /test/btree_test.c | |
parent | f25db1394f728aa9711a7882054c255335e74c80 (diff) | |
download | zix-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.c | 6 |
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); |