[PATCH] virfile: switch to virReportSystemError in VIR_CLOSE() cond.

VIR_CLOSE also set errno, so it's not nessesary use virReportError with explicit error code Signed-off-by: Adam Julis <ajulis@redhat.com> --- src/util/virfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 9463833d31..deaf4555fd 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -467,7 +467,7 @@ virFileWrapperFdNew(int *fd, const char *name, unsigned int flags) goto error; if (VIR_CLOSE(pipefd[!output]) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("unable to close pipe")); + virReportSystemError(errno, "%s", _("unable to close pipe")); goto error; } -- 2.43.0

On 2/22/24 10:14, Adam Julis wrote:
VIR_CLOSE also set errno, so it's not nessesary use virReportError with explicit error code
Signed-off-by: Adam Julis <ajulis@redhat.com> --- src/util/virfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
I've tweaked the commit message a bit and merged. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Michal
participants (2)
-
Adam Julis
-
Michal Prívozník