From: Patrick Steinhardt Date: Mon, 23 Feb 2026 12:20:53 GMT Subject: Re: [PATCH 1/4] t/helper: improve "genrandom" test helper Message-ID: In-Reply-To: <20260223111346.GD215364@coredump.intra.peff.net> On Mon, Feb 23, 2026 at 06:13:46AM -0500, Jeff King wrote: > On Mon, Feb 23, 2026 at 10:50:40AM +0100, Patrick Steinhardt wrote: > > @@ -22,7 +23,9 @@ int cmd__genrandom(int argc, const char **argv) > > next = next * 11 + *c; > > } while (*c++); > > > > - count = (argc == 3) ? strtoul(argv[2], NULL, 0) : ULONG_MAX; > > + count = ULONG_MAX; > > + if (argc == 3 && git_parse_ulong(argv[2], &count) < 0) > > + return error_errno("cannot parse argument '%s'", argv[2]); > > ...I think the return value of git_parse_ulong() is boolean 0/1, not > 0/negative. Ugh, right. Will fix. Patrick