maint: avoid static analysis failure for ignored dup2 return

* src/sort.c: We're ignoring failures from these calls,
so do so explicitly to avoid static analysis issues
as reported by coverity.
This commit is contained in:
Pádraig Brady 2023-07-08 13:42:51 +01:00
parent 1ac8630f1e
commit 2f1cffe07a

View File

@ -1025,9 +1025,9 @@ move_fd (int oldfd, int newfd)
{
if (oldfd != newfd)
{
/* This should never fail for our usage. */
dup2 (oldfd, newfd);
close (oldfd);
/* These should never fail for our usage. */
ignore_value (dup2 (oldfd, newfd));
ignore_value (close (oldfd));
}
}