git/t/helper
Kyle Lippincott b928d57ca9 set errno=0 before strtoX calls
To detect conversion failure after calls to functions like `strtod`, one
can check `errno == ERANGE`. These functions are not guaranteed to set
`errno` to `0` on successful conversion, however. Manual manipulation of
`errno` can likely be avoided by checking that the output pointer
differs from the input pointer, but that's not how other locations, such
as parse.c:139, handle this issue; they set errno to 0 prior to
executing the function.

For every place I could find a strtoX function with an ERANGE check
following it, set `errno = 0;` prior to executing the conversion
function.

Signed-off-by: Kyle Lippincott <spectral@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-08-05 10:59:20 -07:00
..
.gitignore
test-advise.c
test-bitmap.c Merge branch 'ps/use-the-repository' 2024-07-02 09:59:00 -07:00
test-bloom.c Merge branch 'tb/path-filter-fix' 2024-07-08 14:53:10 -07:00
test-bundle-uri.c remote: drop checks for zero-url case 2024-06-14 09:34:39 -07:00
test-cache-tree.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-chmtime.c
test-config.c
test-crontab.c
test-csprng.c
test-date.c
test-delete-gpgsig.c
test-delta.c
test-dir-iterator.c
test-drop-caches.c
test-dump-cache-tree.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-dump-fsmonitor.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-dump-split-index.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-dump-untracked-cache.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-env-helper.c
test-example-tap.c t0080: turn t-basic unit test into a helper 2024-05-06 14:06:34 -07:00
test-fake-ssh.c
test-find-pack.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-fsmonitor-client.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-genrandom.c
test-genzeros.c
test-getcwd.c
test-hash-speed.c hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
test-hash.c
test-hashmap.c global: improve const correctness when assigning string constants 2024-06-07 10:30:48 -07:00
test-hexdump.c
test-json-writer.c set errno=0 before strtoX calls 2024-08-05 10:59:20 -07:00
test-lazy-init-name-hash.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-match-trees.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-mergesort.c
test-mktemp.c
test-oid-array.c t/helper: fix segfault in "oid-array" command without repository 2024-06-14 10:26:34 -07:00
test-online-cpus.c
test-pack-mtimes.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-parse-options.c parse-options: fix leaks for users of OPT_FILENAME 2024-06-11 13:15:04 -07:00
test-parse-pathspec-file.c
test-partial-clone.c t/helper: use correct object hash in partial-clone helper 2024-06-14 10:26:34 -07:00
test-path-utils.c Merge branch 'fixes/2.45.1/2.41' into fixes/2.45.1/2.42 2024-05-24 16:57:43 -07:00
test-pcre2-config.c
test-pkt-line.c
test-proc-receive.c t/helper: remove dependency on `the_repository` in "proc-receive" 2024-06-14 10:26:35 -07:00
test-progress.c
test-reach.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-read-cache.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-read-graph.c Merge branch 'tb/path-filter-fix' 2024-07-08 14:53:10 -07:00
test-read-midx.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-ref-store.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-reftable.c t: move reftable/record_test.c to the unit testing framework 2024-07-02 08:12:24 -07:00
test-regex.c global: improve const correctness when assigning string constants 2024-06-07 10:30:48 -07:00
test-repository.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-revision-walking.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-rot13-filter.c global: improve const correctness when assigning string constants 2024-06-07 10:30:48 -07:00
test-run-command.c test-tool run-command testsuite: support unit tests 2024-05-06 14:06:34 -07:00
test-scrap-cache-tree.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-serve-v2.c
test-sha1.c hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
test-sha1.sh
test-sha256.c hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
test-sigchain.c
test-simple-ipc.c
test-string-list.c
test-submodule-config.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-submodule-nested-repo-config.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-submodule.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-subprocess.c
test-tool-utils.h
test-tool.c t: migrate helper/test-oidmap.c to unit-tests/t-oidmap.c 2024-07-03 09:12:14 -07:00
test-tool.h t: migrate helper/test-oidmap.c to unit-tests/t-oidmap.c 2024-07-03 09:12:14 -07:00
test-trace2.c set errno=0 before strtoX calls 2024-08-05 10:59:20 -07:00
test-truncate.c
test-urlmatch-normalization.c
test-userdiff.c
test-wildmatch.c
test-windows-named-pipe.c
test-write-cache.c global: introduce `USE_THE_REPOSITORY_VARIABLE` macro 2024-06-14 10:26:33 -07:00
test-xml-encode.c