From 3bdf00e881a3b2b788a9f0df213ed54dcd498b04 Mon Sep 17 00:00:00 2001 From: ganchuantao Date: Fri, 12 Sep 2025 05:44:55 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AE=89=E5=85=A8=E5=91=8A?= =?UTF-8?q?=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ganchuantao --- device/plugins/ftrace_plugin/src/flow_controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device/plugins/ftrace_plugin/src/flow_controller.cpp b/device/plugins/ftrace_plugin/src/flow_controller.cpp index 83fe80bac..aaa4f0042 100644 --- a/device/plugins/ftrace_plugin/src/flow_controller.cpp +++ b/device/plugins/ftrace_plugin/src/flow_controller.cpp @@ -370,7 +370,7 @@ long FlowController::HmReadEventData() long nbytes = 0; long used = 0; long rest = bufferSize; - while ((nbytes = reader->Read(&buffer[used], rest)) > 0 && used < bufferSize) { + while (used < bufferSize && (nbytes = reader->Read(&buffer[used], rest)) > 0) { used += nbytes; rest -= nbytes; } -- Gitee