[PULL 3/3] net/colo-compare.c: Fix incorrect return when input wrong size

Jason Wang posted 3 patches 4 years, 1 month ago
Maintainers: Jason Wang <jasowang@redhat.com>, Li Zhijian <lizhijian@cn.fujitsu.com>, Zhang Chen <chen.zhang@intel.com>, Dmitry Fleytman <dmitry.fleytman@gmail.com>
There is a newer version of this series
[PULL 3/3] net/colo-compare.c: Fix incorrect return when input wrong size
Posted by Jason Wang 4 years, 1 month ago
From: Zhang Chen <chen.zhang@intel.com>

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 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 1225f40..b966e7e 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -807,7 +807,7 @@ static int compare_chr_send(CompareState *s,
     }
 
     if (!size) {
-        return 0;
+        return -1;
     }
 
     entry = g_slice_new(SendEntry);
-- 
2.7.4