From 027fc4547c7a18b20972809964029621d4bdbe3b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 3 May 2026 23:05:20 +0200 Subject: test.c: let libsha1_sum_fd (malloc) modify errno MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- test.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test.c') diff --git a/test.c b/test.c index 862f14f..7db60e6 100644 --- a/test.c +++ b/test.c @@ -209,7 +209,9 @@ main(int argc, char *argv[]) exit(0); } close(fds[1]); + test(!errno); test(!libsha1_sum_fd(fds[0], LIBSHA1_1, buf)); + errno = 0; /* malloc(3) as been found to set errno=ENOENT on success */ test(waitpid(pid, &status, 0) == pid); test(!status); close(fds[0]); -- cgit v1.2.3-70-g09d2