On Fri, Apr 10, 2026 at 16:12:08 +0200, Pavel Hrdina via Devel wrote:
> From: Pavel Hrdina <[email protected]>
> 
> Add missing g_autofree as the code looks like it was already written to
> use it.
> 
> Fixes: 6f55137a1c465fde5aabca4530031542f751b4ad

This reference doesn't make sense:

commit 6f55137a1c465fde5aabca4530031542f751b4ad
Author: Michal Prívozník <[email protected]>
Date:   Fri Feb 2 12:49:22 2024 +0100

    virsocket: Drop unused #include and #define

    Inside of virsocket.c there is an include of poll.h and
    PKT_TIMEOUT_MS macro definition. Neither of these is really
    needed and in fact it's a leftover after I reworked one of
    previously merged commits during review.

    Signed-off-by: Michal Privoznik <[email protected]>
    Reviewed-by: Ján Tomko <[email protected]>

diff --git a/src/util/virsocket.c b/src/util/virsocket.c
index 3b274a4eec..a4c646e759 100644
--- a/src/util/virsocket.c
+++ b/src/util/virsocket.c
@@ -26,9 +26,6 @@
 #include "virlog.h"

 #include <fcntl.h>
-#include <poll.h>
-
-#define PKT_TIMEOUT_MS 500 /* ms */

 #define VIR_FROM_THIS VIR_FROM_NONE


IMO it's 6316f26cd2d which added 'chSocketRecv'



> Signed-off-by: Pavel Hrdina <[email protected]>
> ---
>  src/ch/ch_process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c
> index 29db853a7f..a67274b4a5 100644
> --- a/src/ch/ch_process.c
> +++ b/src/ch/ch_process.c
> @@ -548,7 +548,7 @@ static char *
>  chSocketRecv(int sock, bool use_timeout)
>  {
>      struct pollfd pfds[1];
> -    char *buf = NULL;
> +    g_autofree char *buf = NULL;
>      size_t buf_len = 1024;
>      int timeout = PKT_TIMEOUT_MS;
>      int ret;

Reviewed-by: Peter Krempa <[email protected]>

Reply via email to