qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 21/38] plugins: update lockstep to use g_memdup2


From: Thomas Huth
Subject: Re: [PULL 21/38] plugins: update lockstep to use g_memdup2
Date: Mon, 13 Nov 2023 11:46:56 +0100
User-agent: Mozilla Thunderbird

On 03/07/2023 15.44, Alex Bennée wrote:
The old g_memdup is deprecated, use the replacement.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230630180423.558337-22-alex.bennee@linaro.org>

diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c
index e36f0b9562..3614c3564c 100644
--- a/contrib/plugins/lockstep.c
+++ b/contrib/plugins/lockstep.c
@@ -130,7 +130,7 @@ static void report_divergance(ExecState *us, ExecState 
*them)
          }
      }
      divergence_log = g_slist_prepend(divergence_log,
-                                     g_memdup(&divrec, sizeof(divrec)));
+                                     g_memdup2(&divrec, sizeof(divrec)));
/* Output short log entry of going out of sync... */
      if (verbose || divrec.distance == 1 || diverged) {

FYI, this seems to trigger a compiler warning on Ubuntu 20.04:

https://app.travis-ci.com/github/huth/qemu/jobs/613144955#L1914

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]