qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] colo-compare: fix the dangerous assignment


From: Darren Kenny
Subject: Re: [Qemu-devel] [PATCH] colo-compare: fix the dangerous assignment
Date: Thu, 16 Nov 2017 10:13:48 +0000
User-agent: NeoMutt/20171027

On Thu, Nov 16, 2017 at 10:28:32AM +0800, Mao Zhongyi wrote:
Cc: Peter Maydell <address@hidden>
Cc: Jason Wang <address@hidden>
Cc: Zhang Chen <address@hidden>
Cc: Li Zhijian <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Fixes: 8ec14402029d783720f4312ed8a925548e1dad61
Reported-by: Peter Maydell <address@hidden>
Reported-by: Paolo Bonzini <address@hidden>
Signed-off-by: Mao Zhongyi <address@hidden>

Code-wise, this looks like a valid fix to the existing code.

Reviewed-by: Darren Kenny <address@hidden>

But testing wise, have you confirmed that things are behaving as you
expected with the previous patch, since previously when calling
colo_compare_connection(), the value of conn would have always been
its initialized value of NULL.

Just want to be sure that fixing this doesn't end up breaking your
expected behaviour given that all your testing before would have had
a NULL value in conn.

Thanks,

Darren.

---
net/colo-compare.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/colo-compare.c b/net/colo-compare.c
index ccdcba2..1ce195f 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -179,7 +179,7 @@ static int packet_enqueue(CompareState *s, int mode, 
Connection **con)
                         "drop packet");
        }
    }
-    con = &conn;
+    *con = conn;

    return 0;
}
--
2.9.4







reply via email to

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