]> git.ipfire.org Git - thirdparty/coreutils.git/commit
test: simplify for clarity
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 25 Jul 2025 18:56:00 +0000 (11:56 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 25 Jul 2025 19:27:39 +0000 (12:27 -0700)
commit3c40470c5da5cdfdc3dd94d4d820df873898ad43
tree427f2ff9ddd7983b5bfe41158d468bd2b4ec2e13
parentecde78e1df048a4c56e73da7c61424f346c8f5d7
test: simplify for clarity

This should help avoid further audit confusion,
such as was just fixed by removing a FIXME.
* src/test.c (enum binop): New type.
(get_mtime): Return a struct timespec instead of returning
a bool and storing a struct timespec.  All callers changed.
(binop): Return an int recording either success (an enum binop)
or failure (-1).  All callers changed.
(binary_operator): Accept an enum binop, so that we need
not recompute the op type.  All callers changed.  Simplify.
src/test.c