Fix warning for unchecked dup return in regress.c

pull/943/head
John Safranek 2026-04-21 15:11:30 -07:00 committed by Paul Adelsbach
parent aad92b54ea
commit 61186558b8
1 changed files with 1 additions and 0 deletions

View File

@ -1648,6 +1648,7 @@ static void TestPasswordEofNoCrash(void)
WMEMSET(&auth, 0, sizeof(auth));
savedStdin = dup(STDIN_FILENO);
AssertTrue(savedStdin >= 0);
devNull = open("/dev/null", O_RDONLY);
AssertTrue(devNull >= 0);
AssertTrue(dup2(devNull, STDIN_FILENO) >= 0);